Skip to content

Commit

Permalink
Allow CH4_INV and CO2_INV to be skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Oct 18, 2024
1 parent 4869f19 commit e7e90dc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils/combine_ant_bio.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
"""
Combine/reassign HEMCO species in order to get:
CMAQv5.4 CB6 Emission Species w/biogenics
CMAQv5.2.1 or CMAQv5.4 CB6 Emission Species w/biogenics
"""

SPECIES = [
Expand All @@ -15,8 +15,10 @@
"BENZ",
"BUTADIENE13",
"CH4",
"CH4_INV",
"CL2",
"CO",
"CO2_INV",
"ETH",
"ETHA",
"ETHY",
Expand Down Expand Up @@ -159,6 +161,11 @@ def main(ifp, ofp, *, compress=True):
ds_new["NO"][:] = ds["SOILNOX_NO"][:] + ds["NO_ant"][:]
# 4. The remainder of species are just anthropogenic from HEMCO
else:
# NEMO/NEI2019 doesn't have these
if spc in {"CH4_INV", "CO2_INV"} and f"{spc}_ant" not in ds.variables:
print(f"note: skipping {spc}")
continue

ds_new[spc][:] = ds[f"{spc}_ant"][:]

ds.close()
Expand Down

0 comments on commit e7e90dc

Please sign in to comment.