Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies between photolysis species listed in species_database.yml and FJX_j2j.dat for fullchem mechanism #2456

Closed
yantosca opened this issue Sep 10, 2024 · 12 comments · Fixed by #2457
Assignees
Labels
category: Bug Something isn't working topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms topic: Configuration Files Related to GEOS-Chem configuration files topic: Photolysis Related to photolyis rate computations
Milestone

Comments

@yantosca
Copy link
Contributor

Your name

Bob Yantosca

Your affiliation

Harvard + GCST

What happened? What did you expect to happen?

While benchmarking the recent chemistry updates added in PR #2318 and PR #2371, I noticed that there were several mismatches between species that were declared with Is_Photolyis: true in the species_database.yml file and the FJX_j2j.dat file (which tells Cloud-J which species are photolyzing).

Configuration files:

What are the steps to reproduce the bug?

I wrote the following Python script to compare species that were defined with Is_Photolysis: true in species_database.yml vs. the FJX_j2j.dat file:

#!/usr/bin/env python3

from gcpy import read_config_file

# Get the list of photo species from the species database
spc_db = read_config_file("/n/holyscratch01/jacob_lab/ryantosca/tests/14.5.0/gc2452/GCClassic/src/GEOS-Chem/run/shared/species_database.yml")
photo_spc = []
for spc in spc_db:
    if "Is_Photolysis" in spc_db[spc]:
        if spc_db[spc]["Is_Photolysis"] is True:
            photo_spc.append(spc)

# Get the list of photo species in fjx_j2j.dat
fjx_file = "/n/holyscratch01/external_repos/GEOS-CHEM/gcgrid/data/ExtData/CHEM_INPUTS/CLOUD_J/v2024-09/FJX_j2j.dat"
fjx_spc = []
with open(fjx_file, "r", encoding="utf-8") as ifile:
    for line in list(ifile):
        line = line.strip("\n")
        if "PHOTON" in line:
            fjx_spc.append(line.split()[1])


# Convert to sets
photo_spc = set(photo_spc)
fjx_spc = set(fjx_spc)


print("In FJX_j2j.dat but not in species_database")
print(sorted(list(fjx_spc.difference(photo_spc))))
print()
print("In species_database but not in FJX_j2j.dat")
print(sorted(list(photo_spc.difference(fjx_spc))))

Which gives this output:

In FJX_j2j.dat but not in species_database
['BPINOOH', 'BPINP', 'C96O2H', 'CF3I', 'H12O2', 'H2O', 'HO2', 'LIMO2H', 'LIMO3H', 'PINAL', 'PINO3H', 'PINONIC', 'SO2']
In species_database but not in FJX_j2j.dat
['ACR', 'ALK4N2', 'ALK4P', 'APAN', 'AROMPN', 'BPINN', 'BPINON', 'C96N', 'CHCl3', 'HC5A', 'Hg2ORGP', 'HgBr', 'HgBr2', 'HgBrBrO', 'HgBrClO', 'HgBrHO2', 'HgBrNO2', 'HgBrOH', 'HgCl', 'HgCl2', 'HgClBr', 'HgClBrO', 'HgClClO', 'HgClHO2', 'HgClNO2', 'HgClOH', 'HgOH', 'HgOHBrO', 'HgOHClO', 'HgOHHO2', 'HgOHNO2', 'HgOHOH', 'Hg_OTHER_PROP', 'LIMPAN', 'MEKPN', 'MPAN', 'O3Strat', 'O3_PROP', 'O3afbl', 'O3asbl', 'O3atbl', 'O3eubl', 'O3init', 'O3mt', 'O3nabl', 'O3pcbl', 'O3row', 'O3usa', 'O3ut', 'PHAN', 'PIN', 'PINPAN', 'R7N2', 'R7P', 'RNO3']

we can ignore the Hg* and O3* species, as these are for specialty simulations. But as you can see, there are several photolyzed species in FJX_j2j.dat that are not tagged with Is_Photolysis: true in the species_database.yml file. Thus, the J-value diagnostics for these species will not be archived.

Also, note there is a halogen species H12O2 (which I think is a typo for H1202 aka CF2Br2 "dibromodilfluoromethane" that is not currently in the fullchem mechanism.

I can edit the species database file accordingly to remove the Is_Photolysis: True tag from the species that are not in FJX_j2j.dat. But what should we do about H12O2?

Tagging @msulprizio @lizziel @ktravis213 @kelvinhb

Please attach any relevant configuration and log files.

No response

What GEOS-Chem version were you using?

14.5.0 in prep

What environment were you running GEOS-Chem on?

Local cluster

What compiler and version were you using?

gcc 10.2.0

Will you be addressing this bug yourself?

Yes, but I will need some help

In what configuration were you running GEOS-Chem?

GCClassic

What simulation were you running?

Full chemistry

As what resolution were you running GEOS-Chem?

4x5

What meterology fields did you use?

MERRA-2

Additional information

No response

@yantosca yantosca added category: Bug Something isn't working topic: Configuration Files Related to GEOS-Chem configuration files topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms labels Sep 10, 2024
@yantosca yantosca added this to the 14.5.0 milestone Sep 10, 2024
@yantosca yantosca self-assigned this Sep 10, 2024
@yantosca
Copy link
Contributor Author

Also CF3I is listed in FJX_j2j.dat but doesn't seem to be a species in the fullchem mechanism.

@lizziel
Copy link
Contributor

lizziel commented Sep 10, 2024

I can edit the species database file accordingly to remove the Is_Photolysis: True tag from the species that are not in FJX_j2j.dat.

Some of the species not in FJX_j2j.dat have photolysis reactions in fullchem.eqn, e.g. ACR. And some of the species not in the species database have reactions in fullchem.eqn, e.g. BPINOOH. Maybe fullchem.eqn should be considered the official source of the new chemistry and both FJX_j2j.dat and species database should be updated?

@lizziel
Copy link
Contributor

lizziel commented Sep 10, 2024

It looks like there are other oddities as well, such as TLFUONE included as advected in the species database in PR #2318 but excluded from the PR's geoschem_config.yml advected species list. Is there a PR that documents the changes to the original PR which wasn't merged?

@lizziel
Copy link
Contributor

lizziel commented Sep 10, 2024

You can ignore my first comment above since I was confused about what Is_Photolysis in the species database means. It does NOT indicate whether or not the species is photolyzed.

@yantosca
Copy link
Contributor Author

Some of the species not in FJX_j2j.dat have photolysis reactions in fullchem.eqn, e.g. ACR. And some of the species not in the species database have reactions in fullchem.eqn, e.g. BPINOOH. Maybe fullchem.eqn should be considered the official source of the new chemistry and both FJX_j2j.dat and species database should be updated?

The photolyzing species are defined in FJX_j2j.dat. But some of them can use the same cross-section (the rightmost column in the FJX_j2j.dat file).

The Is_Photolysis: true tags in species_database.yml are there to place photolyzed species into the JValues history collection when using the JVal_?JVN? wildcard. Only the species that are defined in FJX_j2j.dat should have the Is_Photolysis: true tag.

@yantosca
Copy link
Contributor Author

It looks like there are other oddities as well, such as TLFUONE included as advected in the species database in PR #2318 but excluded from the PR's geoschem_config.yml advected species list. Is there a PR that documents the changes to the original PR which wasn't merged?

I'm not sure there is. I think I may have added species to the geoschem_config.yml for which we had emissions (since those can only be for advected species). Am relying on @ktravis213 and @kelvinhb to help us clarify.

@lizziel
Copy link
Contributor

lizziel commented Sep 10, 2024

Just to be clear on terminology, which of the two below statements is true:

  1. A species is considered to be photolyzed in GEOS-Chem if it undergoes a reaction in KPP in the presence of sunlight.
  2. A species is considered to be photolyzed in GEOS-Chem only if J-values are computed specifically for that species in Fast-JX/Cloud-J.

Intuitively I would think the first is true, with J-values either coming from its reaction specifically or mapped from J-values for a different reaction.

@yantosca
Copy link
Contributor Author

yantosca commented Sep 10, 2024

@lizziel: Good point. I would say that in general Statement 1 is true. Not all species would have to be have a J-rate computed by FAST-JX or Cloud-J, as you could have a species with a constant J-value that is just specified in the KPP equation file.

In the current GEOS-Chem fullchem mechanism, all photo reactions have rates generated by Cloud-J (they are stored in the PHOTOL array and passed to KPP that way).

@yantosca
Copy link
Contributor Author

yantosca commented Sep 10, 2024

@lizziel: If you count up all the rxns with X + hv in the fullchem.eqn file, those are the photolyzing species. But I've discovered a couple of existing photo species (e.g. AROMCHO) also weren't tagged with Is_Photolysis: true.

I will do a cross-check of the fullchem.eqn with species_database.yml and FJX_j2j.dat and make further changes.

@ktravis213
Copy link

Hi @lizziel and @yantosca. I am worried something has gone wrong in how I did the pull request. I updated the species_database.yml and geoschem_config.fullchem.yml in my pull request. Both have ACR listed and species_database has ACR as photolyzing. It is also a photolysis rx in fullchem.eqn, and it is just given the same rate as MACR (PHOTOL(66) in the attached files).
GC13.zip

@yantosca
Copy link
Contributor Author

Hi @ktravis213. I think I have it all sorted out in PR #2457. Am running some tests before I declare it ready for review.

@yantosca
Copy link
Contributor Author

We can now close out this issue as PR #2457 has been merged into the GEOS-Chem 14.5.0 development stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms topic: Configuration Files Related to GEOS-Chem configuration files topic: Photolysis Related to photolyis rate computations
Projects
None yet
3 participants