# How to get mass emissions diagnostic file using in-line biogenic emissions with CMAQv5.4/MEGANv3.2?

**URL:** <https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905>\
**Category:** CMAQ\
**Created:** [February 10, 2023, 8:45pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905 "2023-02-10T20:45:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![FengLiu](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@FengLiu](https://forum.cmascenter.org/u/FengLiu)\
**Post date:** [February 10, 2023, 8:45pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/1 "2023-02-10T20:45:39Z")

</div>

Hi,

I noticed that we can get BEIS mass emissions diagnostic file with the following setting in the run script when we run CMAQv5.4 using in-line biogenic emissions with BEIS4.

setenv B3GTS\_DIAG Y #\> BEIS mass emissions diagnostic file [default: N] [default: N]

I can’t help wondering how to get the same file when we run CMAQ using in-line biogenic emissions with MEGANv3.2.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [February 11, 2023, 2:49am UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/2 "2023-02-11T02:49:28Z")

</div>

Hi Feng,

no, there is no corresponding option to output mass-based diagnostic emission files for the MEGANv3.2 inline option, but you can use DESID to output mole based diagnostic emission files. Please see the discussion in this [other thread](https://forum.cmascenter.org/t/no-megan-mass-emissions-diagnostic-file-in-cmaq-v5-4-similar-to-beis/3747) for further details.

Christian

---

<div class="post-metadata">

**Author:** ![FengLiu](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@FengLiu](https://forum.cmascenter.org/u/FengLiu)\
**Post date:** [February 13, 2023, 7:39pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/3 "2023-02-13T19:39:37Z")

</div>

Hi Christian,

Thank you so much for the updates. It is very helpful to get idea how to control diagnostic emission files.

The option ‘COLSUM’ in DESID control file means the summed throughout each vertical column according to Appendix B: Emissions Input and Control in CMAQ User’s Guide. However, biogenic emissions only happen on the surface or the first model layer. Should we use LAYER1 (but it is not shown in your message) or D2 instead? What is difference between 2D and LAYER1? Is the following option correct for biogenic emissions?

Desid\_Diag\_Fmt\_Nml(1) = ‘COLSUM’ ! Options: 2D, 2DCOL, 3D

Thanks.

Feng

---

<div class="post-metadata">

**Author:** ![Ben\_Murphy](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@Ben\_Murphy](https://forum.cmascenter.org/u/Ben_Murphy)\
**Post date:** [February 13, 2023, 8:13pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/4 "2023-02-13T20:13:47Z")

</div>

Hi Feng,

All of these options should give you the same result for biogenics. We updated the names of the options between v5.3 and v5.4 so 2D was updated to LAYER1, and 2DCOL was updated to COLSUM.

I recommend using COLSUM only because it will also give you the total if you happen to use it for a different source that has emissions aloft.

Cheers,  
Ben Murphy

---

<div class="post-metadata">

**Author:** ![FengLiu](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@FengLiu](https://forum.cmascenter.org/u/FengLiu)\
**Post date:** [February 13, 2023, 8:56pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/5 "2023-02-13T20:56:34Z")

</div>

Hi Ben,

I got your point.

Thank you very much for your response and the updates about the options.

Feng

---

<div class="post-metadata">

**Author:** ![FengLiu](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@FengLiu](https://forum.cmascenter.org/u/FengLiu)\
**Post date:** [February 13, 2023, 9:46pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/6 "2023-02-13T21:46:20Z")

</div>

Hi Ben,

I submitted a job immediately after received your confirmation about the option of COLSUM. I got the following error message after the model crashed.

```
  |> Reading Emission Control Namelist:
 +======================================

 Performing Basic Error Checks for Emission Scaling Rules

 ERROR: There was a syntax error reading the number of Diagnostic Rules for
   use by the DESID module. Please check the format of each line for syntax
   errors. The invalid line was likely:
      Desid_Diag_Streams_Nml(1,:)= 'MIOG'                                                                                                                                                                  

 *** ERROR ABORT in subroutine DESID_READ_NAMEL on PE 000
 CMAQ must Crash until you fix Desid_N_Diag_Rules

```

Please see the settings in my DESID control file as below

&Desid\_DiagVars  
Desid\_N\_Diag\_Rules = 1 ! Exact Number of Diagnostic Rules Below  
Desid\_Max\_Diag\_Streams=20 ! Maximum number of species variables on all rules  
! below (do not count expansions)  
Desid\_Max\_Diag\_Spec = 80 ! Maximum number of species variables on all rules  
! below (do not count expansions)  
Desid\_Diag\_Streams\_Nml(1,:)= ‘MIOG’  
Desid\_Diag\_Fmt\_Nml(1) = ‘COLSUM’ ! Options: 2D, 2DCOL, 3D  
Desid\_Diag\_Spec\_Nml(1,: ) = ‘ALL’

/

---

<div class="post-metadata">

**Author:** ![Ben\_Murphy](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@Ben\_Murphy](https://forum.cmascenter.org/u/Ben_Murphy)\
**Post date:** [February 13, 2023, 10:06pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/7 "2023-02-13T22:06:32Z")

</div>

Hi Feng,

No big deal. You’re missing a couple of key lines. In a new line after the second occurrence of “! below (do not count expansions)”, enter the following lines:

```auto
/
&Desid_Diag

```

That should piece everything together.  
Best,  
Ben

---

<div class="post-metadata">

**Author:** ![FengLiu](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@FengLiu](https://forum.cmascenter.org/u/FengLiu)\
**Post date:** [February 13, 2023, 11:14pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/8 "2023-02-13T23:14:56Z")

</div>

Hi Ben,

Yes, you are right, that error is gone.

But the model is crashed again due to the new error message as below. Note that my WRF run is based on Noah LSM

```
 *** ERROR ABORT in subroutine BDSNPHRNO on PE 000
 BDSNP Soil NO is only compatible with PX version

```

* * *

WRF outputs using Noah LSM (MCIP output: METCRO2D ) do not include WSAT ( soil saturation from PX LSM). I am wondering if WSAT must be available for both MEGAN and BEIS4 if BDSNP is turned on.

MEGAN 3.2 gives the option of using either the Yienger and Levy approach or the BDSNP approach as it is implemented in CMAQ. However, we have to run WRF with PX\_LSM if we wan to use BDSNP approach for calculating soil NO emissions, is that right?

Please see settings in my current CMAQ run script which led to errors above.

setenv PX\_VERSION N #\> WRF PX LSM  
setenv CLM\_VERSION N #\> WRF CLM LSM  
setenv NOAH\_VERSION Y #\> WRF NOAH LSM

Thank you very much.

---

<div class="post-metadata">

**Author:** ![willison.jeff](https://avatars.discourse-cdn.com/v4/letter/w/c89c15/32.png) [@willison.jeff](https://forum.cmascenter.org/u/willison.jeff)\
**Post date:** [February 14, 2023, 8:43pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/9 "2023-02-14T20:43:43Z")

</div>

That PX constraint comes from MEGAN 3.2, but the MEGAN implementation in CMAQ should be able to use NOAH LSM if you comment out these lines in BDSNP\_MOD.F

> C ! make sure it only runs with PX version  
> IF( .NOT. PX\_LSM ) THEN  
> MESG = “BDSNP Soil NO is only compatible with PX version”  
> CALL M3EXIT( PNAME, JDATE, JTIME, MESG, 2)  
> END IF

This check was left in place pending further testing. The WSAT values are different for NOAH. There is also some inconsistency in the design. PX uses soil moisture for the top 1 cm, while in the NOAH top layer is 10 cm thick. The amount of NO produced by the BDSNP model is dependent on the frequency of drying/wetting in that top layer. The original implementation of BDSNP used 2 cm soil depth from GEOS-Chem, so possibly less pulsing than what you would see with PX but more pulsing than you would get with NOAH.

Proceed with caution and make sure the soil NO emissions look reasonable for your application.

---

<div class="post-metadata">

**Author:** ![FengLiu](https://avatars.discourse-cdn.com/v4/letter/f/49beb7/32.png) [@FengLiu](https://forum.cmascenter.org/u/FengLiu)\
**Post date:** [February 15, 2023, 7:37pm UTC](https://forum.cmascenter.org/t/how-to-get-mass-emissions-diagnostic-file-using-in-line-biogenic-emissions-with-cmaqv5-4-meganv3-2/3905/10 "2023-02-15T19:37:32Z")

</div>

Hello Jeff,

Thank you very much for your response and comments about top layer soil moisture required by BDSNP approach. It is interesting. I will get more details about BDSNP scheme. BTW, we use NOAH land surface model in WRF because the model performance is better than other runs with different LSMs.

In order to keep model running with NOAH, we can either comment out lines 192 - 195 in BDSNP\_MOD.F according to you suggestion or keep PX\_VERSION = Y in run script.

In addition I did not find the logical definition of NOAH\_VERSION in BDSNP\_MOD.F and megan\_hrno\_mod.F. I have no idea how NOAH\_VERSION Y in run script works.

I will get back to you after I have the model run and get results successfully.

Thank you very much.
