From e7e90dc3ca52593e5e4e4c76bf3c2fa0795a6910 Mon Sep 17 00:00:00 2001 From: zmoon Date: Fri, 18 Oct 2024 11:16:38 -0500 Subject: [PATCH] Allow CH4_INV and CO2_INV to be skipped --- utils/combine_ant_bio.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/utils/combine_ant_bio.py b/utils/combine_ant_bio.py index 7fef814..74682ad 100755 --- a/utils/combine_ant_bio.py +++ b/utils/combine_ant_bio.py @@ -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 = [ @@ -15,8 +15,10 @@ "BENZ", "BUTADIENE13", "CH4", + "CH4_INV", "CL2", "CO", + "CO2_INV", "ETH", "ETHA", "ETHY", @@ -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()