# Double counting NH3 emissions when using NH3 Bidi flux in CMAQ

**URL:** <https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861>\
**Category:** CMAQ-PREP\
**Tags:** smoke\
**Created:** [October 23, 2020, 5:55pm UTC](https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861 "2020-10-23T17:55:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [October 23, 2020, 5:55pm UTC](https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861/1 "2020-10-23T17:55:04Z")

</div>

I am turning the ‘ammonia bi-directional flux’ on within the CMAQv5.3.2 runscript environment variable **setenv CTM\_ABFLUX Y** and feeding in FEST-C input files:

```
setenv E2C_SOIL ${INPDIR}/toCMAQ_festc1.4_epic/us1_2016_cmaq12km_soil.nc
setenv E2C_CHEM ${INPDIR}/toCMAQ_festc1.4_epic/us1_2016_cmaq12km_time${YYYYMMDD}.nc
setenv E2C_LU ${INPDIR}/beld4_camq12km_2011_4CMAQioapi.ncf

```

There is also another option in the runscript that I switched on to subtract fertilizer NH3 from emissions because it will be handled by the BiDi calculation: **setenv CTM\_BIDI\_FERT\_NH3 Y**.

From what I understand, in the SMOKE emission files, the ‘ag’ sector is one sector that includes NH3 emissions from fertilizers and livestock; there may be other industrial sources of NH3 as well. Does not doing **setenv CTM\_BIDI\_FERT\_NH3 Y** in CMAQ runscript nullify all NH3 emissions coming from the merged 2D SMOKE emissions (using mrggrd to merge all 2D emission sector files) fed to CMAQ? From what I understand, I should only make the SMOKE fertilizer NH3 emissions zero if I am separately feeding FEST-C daily files, but not sure how I can do that. I am just trying to make sure I am not double counting NH3 emissions in CMAQ!

---

<div class="post-metadata">

**Author:** ![jbash](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jbash](https://forum.cmascenter.org/u/jbash)\
**Post date:** [November 13, 2020, 2:16pm UTC](https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861/2 "2020-11-13T14:16:42Z")

</div>

Fertilizer emissions should not be double counted as long as your emissions file contains the variable NH3\_FERT (emissions from fertilizers) and NH3 (the total NH3 emissions from all sectors). When bidirectional NH3 is selected and **setenv CTM\_BIDI\_FERT\_NH3 Y** the NH3\_FERT variable from the emissions file is subtracted from the total NH3 emissions. If you do not have the NH3\_FERT variable, then you should get an error when these flags are selected.

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [December 7, 2020, 12:50pm UTC](https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861/3 "2020-12-07T12:50:08Z")

</div>

Thanks @jbash. When using NH3-bidi in CMAQv5.3.2, is it OK to have NaN values for the variables ‘NH3’ and ‘NH3\_Emis’ but not ‘NH3\_Flux’ in the CCTM\_DRYDEP\_\* output file? I have more info with plots at the post [NaN values of NH3\_Emis variable in CCTM\_DRYDEP\_\* file](https://forum.cmascenter.org/t/nan-values-of-nh3-emis-variable-in-cctm-drydep-file/1964) regarding this issue.

---

<div class="post-metadata">

**Author:** ![jbash](https://avatars.discourse-cdn.com/v4/letter/j/8e8cbc/32.png) [@jbash](https://forum.cmascenter.org/u/jbash)\
**Post date:** [December 7, 2020, 2:38pm UTC](https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861/4 "2020-12-07T14:38:09Z")

</div>

Hi @skunwar. It is not okay to get a nan in the NH3\_Emis or NH3 variable. Is the model simulation stopping at the NaN? If not, I suspect you are running the m3dry deposition option as the STAGE deposition option uses the NH3\_Emis variable internally while it is just a diagnostic output for m3dry. You can confirm the deposition option by searching for m3dry.F in the build directory. If the file exists, then you are running m3dry dry deposition.

If you want to run the STAGE deposition option it is only a flag to set in the bldit\_cctm.csh script.

# set DepMod = m3dry #\> m3dry or stage

set DepMod = stage

Take care,  
Jesse

---

<div class="post-metadata">

**Author:** ![skunwar](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@skunwar](https://forum.cmascenter.org/u/skunwar)\
**Post date:** [December 7, 2020, 3:09pm UTC](https://forum.cmascenter.org/t/double-counting-nh3-emissions-when-using-nh3-bidi-flux-in-cmaq/1861/5 "2020-12-07T15:09:18Z")

</div>

Thanks a lot for the information.

I searched for the terms DepMod, stage and m3dry in my CMAQv5.3.2 (cb6r3\_ae7) runscript, and did not find any of them. Then I check my CMAQ BLD\* directory when I saw m3dry.F and m3dry.o files, which confirm that I am indeed running the m3dry module.

Actually, my CMAQ run has not aborted at these **NaN** values of NH3 and NH3\_Emis in the CCTM\_DEPV\_\* CMAQ output files, or the **Infinity** values of standard deviation (screenshot shown in the post [NaN values of NH3\_Emis variable in CCTM\_DRYDEP\_\* file](https://forum.cmascenter.org/t/nan-values-of-nh3-emis-variable-in-cctm-drydep-file/1964)) of all FEST model output files (input to CMAQ bidi).

My questions here:

1. Is it a possibly a problem starting with the FEST input files that I downloaded from the repository?
2. Is there any preference between the two modules m3dry and stage for NH3-bidi process? Would using stage have avoided getting NaN values for NH3 and NH3\_Emis variable in CCTM\_DEPV\_\* files?
