geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
167 stars 160 forks source link

[QUESTION] How to get concentration of H+ ion? #1188

Closed lixiao-bit closed 2 years ago

lixiao-bit commented 2 years ago

Ask a question about GEOS-Chem:

Hi GC Team,

I need to calculate the reaction rate of a chemical reaction in Tropchem.eqn, which requires the concentration of Hydrogen ion (H+). In the research result of Yu at el.(2017), in the AMAR model, the estimation of Hydrogen ion (H+) is based on EAIM II aerosol thermodynamical system. I look into the GC wiki website, GC approximately uses the ISORROPIA II aerosol thermodynamical system. therefore, is that appropriate for me to call the variable named HplusSav in state_chm_mod.F90 to get H+ concentration.

Thanks.

yantosca commented 2 years ago

Thanks for writing @lixiao-bit. You must be using one of the GEOS-Chem 12 versions. In the more recent versions I believe we renamed State_Chm%HplusSav to State_Chm%IsorropHplus to reflect more accurately the nature of the quantity.

In either case, this diagnostic archives H+ in molal (mol/L of water) concentration.

          ! AEROPH: get pH related info to SAV arrays (hotp 8/11/09)
          ! HPLUSTEMP is H+ in mol/L water, AERLIQ1 is H, AERLIQ8 is H2O
          ! 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 (hotp, ccc, 12/18/09)
             ! Force IsorropAeropH to 20e0 (X. Wang, 6/27/19)
             !HPLUSTEMP       = 1e+20_fp
             HPLUSTEMP       = 1.0e-30_fp
             SULFTEMP        = 1.0e-30_fp
             BISULTEMP       = 1.0e-30_fp
             NITRTEMP        = 1.0e-30_fp
             CLTEMP          = 1.0e-30_fp
             !State_Chm%IsorropAeropH(I,J,L,N) = -999e+0_fp
             State_Chm%IsorropAeropH(I,J,L,N) = 20.0_fp
          ELSE
             HPLUSTEMP    = AERLIQ(1) / AERLIQ(8) * 1.0e+3_fp / 18.0_fp
             SULFTEMP     = AERLIQ(5) / AERLIQ(8) * 1.0e+3_fp / 18.0_fp
             BISULTEMP    = AERLIQ(6) / AERLIQ(8) * 1.0e+3_fp / 18.0_fp
             NITRTEMP     = AERLIQ(7) / AERLIQ(8) * 1.0e+3_fp / 18.0_fp
             CLTEMP       = AERLIQ(4) / AERLIQ(8) * 1.0e+3_fp / 18.0_fp

             ! Use SAFELOG10 to prevent NAN
             State_Chm%IsorropAeropH(I,J,L,N)=-1.0_fp*SAFELOG10(HPLUSTEMP)
          ENDIF

          ! Additional Info
          State_Chm%IsorropHplus(I,J,L,N)   = MAX(HPLUSTEMP, 1e-30_fp)
yantosca commented 2 years ago

I will close out this issue for now. Please reach out if you are still having problems.