# Fail to generate the ASENS file in CMAQ-DDM V5.4

**URL:** https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005
**Category:** CMAQ-DDM-3D
**Created:** [March 23, 2023, 11:12pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005 "2023-03-23T23:12:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)
#### Post date: [March 23, 2023, 11:12pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/1 "2023-03-23T23:12:50Z")

</div>

I am using CMAQv5.4 to run DDM for a simulation but the program fails to generate the ASENS file the log files show the program is done successfully. I am using SAPRC07 and I have only one emission species in sensinput.dat for testing. The ASENS file is created but only has 11k which must be something wrong. Other than that, the simulation seems done successfully, ACONC, CONC and SENGRID are in normal size and the variables in them are reasonable. Looking forward to help.

Best,  
K

---

<div class="post-metadata">

### Author: ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forum.cmascenter.org/u/sergey)
#### Post date: [March 27, 2023, 12:20pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/2 "2023-03-27T12:20:58Z")

</div>

Thanks for making a new thread.

It is unusual that the program completes and creates a SENGRID files, but not the ASENS files. Does SENGRID have reasonable values?

Another thing to check would be that your GRIDDED\_BEIS actually has NO species values in it. Or run a different sensitivity parameter - maybe one to total NO like this (but with proper formatting):

BIE  
EMIS  
SPECIES  
NO

END

Sergey

---

<div class="post-metadata">

### Author: ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)
#### Post date: [March 28, 2023, 8:50pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/3 "2023-03-28T20:50:00Z")

</div>

> [@sergey](#):
>
> ENGRID have reasonable values?

Yes, I think SENGRID has reasonable values (not infinity or zero). And I had tried different options in seninput.dat, including single species (e.g., NO, SO) and all emissions. All test run come up with the same issue.

---

<div class="post-metadata">

### Author: ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forum.cmascenter.org/u/sergey)
#### Post date: [March 29, 2023, 12:37pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/4 "2023-03-29T12:37:25Z")

</div>

I have no idea why you are experiencing this, honestly. The last thing to check would be to see if you are removing the old output files completely and to check that you are writing into a completely clean and empty directory.

Sergey

---

<div class="post-metadata">

### Author: ![copycky28](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@copycky28](https://forum.cmascenter.org/u/copycky28)
#### Post date: [June 26, 2023, 4:47pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/6 "2023-06-26T16:47:24Z")

</div>

I found this and seems it solves the problems:

> [@CMAQv5.2 DDM - not able to output more than one sens](https://forum.cmascenter.org/t/cmaqv5-2-ddm-not-able-to-output-more-than-one-sens/3669/4):
>
> Hi @sergey Thank you for this. I tried to limit the amount of species in the run script (changed from ALL to a select few), and I think either the program crashed or it did not limit the reporting to those listed.

Not sure if it is correct, I tried to use medium memory IOAPI and still got the same error. I tried this modification and now the ASENS file seems successfully generated (regular size).

---

<div class="post-metadata">

### Author: ![wry2233](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/wry2233/32/3458_2.png) [@wry2233](https://forum.cmascenter.org/u/wry2233)
#### Post date: [September 15, 2023, 1:55am UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/7 "2023-09-15T01:55:53Z")

</div>

Hi Sergey,  
I have got the same error when I run the latest CMAQ 5.4-HDDM(compiled in September 2023). I have limited the output species, used large IOAPI and online MEGAN.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/9/9a1f3a92b2ed8430e4ea0dda173ad1808249c6c7.png)

Here’s my sensinput.dat and the error:  
[sensinput.txt](https://forum.cmascenter.org/uploads/short-url/v5M5qC6Oye1jVkUAfiTA1PwAzUm.txt) (424 Bytes)

```
>>--->> WARNING in subroutine WRITE3
 Variable O3_ENO not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_ENO to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine WRITE3
 Variable O3_2EN not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_2EN to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine WRITE3
 Variable O3_EVA not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_EVA to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine WRITE3
 Variable O3_2EA not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_2EA to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine WRITE3
 Variable O3_EVB not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_EVB to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine WRITE3
 Variable O3_2EB not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_2EB to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine WRITE3
 Variable O3_ENV not in file: A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)
 
 >>--->> WARNING in subroutine PWRGRDD on PE 000
 Could not write O3_ENV to file A_SENS_1
 M3WARN: DTBUF 0:00:00 Sept. 20, 2021(2021263:000000)

```

And I tried to run CMAQ5.4 HDDM in the former version (compiled in March 2023) and output the normal ASENS file.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/8/8257656012e67dd1c4f957e3b3e406e298852d08.png)

---

<div class="post-metadata">

### Author: ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forum.cmascenter.org/u/sergey)
#### Post date: [September 18, 2023, 3:38pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/8 "2023-09-18T15:38:51Z")

</div>

This looks like you have an previously created file that exists in your output directory and the code is trying to add to it. I would make sure that you are writing to a completely empty output directory as the first test.

Sergey

---

<div class="post-metadata">

### Author: ![wry2233](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/wry2233/32/3458_2.png) [@wry2233](https://forum.cmascenter.org/u/wry2233)
#### Post date: [September 19, 2023, 12:22pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/9 "2023-09-19T12:22:01Z")

</div>

Hi Sergey,  
I tried to specify a new empty output directory but still got the same error.

---

<div class="post-metadata">

### Author: ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forum.cmascenter.org/u/sergey)
#### Post date: [September 21, 2023, 12:24pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/10 "2023-09-21T12:24:59Z")

</div>

Please, attach the rest of the log file. Or look for text similar to:

```
 Could not open A_SENS_1 file for update - try to open new

 Avg Sens File Header Description:
   DDM3D Sensitivity file output
   Averaged over the synchronization time steps

```

What follows should be the list of variable.

Sergey

---

<div class="post-metadata">

### Author: ![wry2233](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/wry2233/32/3458_2.png) [@wry2233](https://forum.cmascenter.org/u/wry2233)
#### Post date: [September 22, 2023, 3:30am UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/11 "2023-09-22T03:30:28Z")

</div>

Hi, Sergey  
Here is the LOG file.  
[CTM\_LOG\_000.PRD\_process\_2\_d03\_mcip5.0\_megan\_DDM3D\_new\_20210920.txt](https://forum.cmascenter.org/uploads/short-url/h8RwH9Zz3kcvTyb1gPVwkjGDPlc.txt) (7.8 MB)

---

<div class="post-metadata">

### Author: ![sergey](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@sergey](https://forum.cmascenter.org/u/sergey)
#### Post date: [September 22, 2023, 1:41pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/12 "2023-09-22T13:41:57Z")

</div>

wry2233,

Please try the 5.4+ branch code. From your log file, it is evident that you are not using the latest release.

When you go to the CMAQ github page ([GitHub - USEPA/CMAQ: Code for U.S. EPA’s Community Multiscale Air Quality Model (CMAQ) which helps in conducting air quality model simulations](https://github.com/USEPA/CMAQ)), the default branch is called “main.” Click where it says “main” and select “5.4+” towards the bottom of the selection list. Using this code will address your issue.

Sergey

---

<div class="post-metadata">

### Author: ![LMZ](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@LMZ](https://forum.cmascenter.org/u/LMZ)
#### Post date: [September 19, 2024, 8:28am UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/13 "2024-09-19T08:28:41Z")

</div>

Hi， sergey，I installed CMAQ5.4 and opened DDM in the CCTM module. Strangely, no DDM-related files were generated, only a part of files were generated. What is the matter with this situation

 ![a792f116bb9ac96c3cb0a774145e27b](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/5/5eac483f2a267d01e2751ee3f502cbaa798a36d7.png)  
 ![7fdbfac0de8cf0e40ef64ac1fe65f96](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/e/e63aaaca730647cb654b73b11f7e2b86cef05939.png)

---

<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: [September 19, 2024, 11:32am UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/14 "2024-09-19T11:32:37Z")

</div>

As shown in the comments of the screenshot you posted (“#Additionally requires for CCTM to be compiled for DDM-3D simulations”), DDM-3D needs to be enabled when you compile CCTM, it is not sufficient to only enable CTM\_DDM3D in the run script.

[Step 7 of the DDM tutorial](https://github.com/USEPA/CMAQ/blob/main/DOCS/Users_Guide/Tutorials/CMAQ_UG_tutorial_DDM3D.md#step-7-modify-the-bldit_cctmcsh) shows which line in the bldit\_cctm.csh script needs to be uncommented to compile CCTM with DDM-3D enabled.

---

<div class="post-metadata">

### Author: ![LMZ](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@LMZ](https://forum.cmascenter.org/u/LMZ)
#### Post date: [September 19, 2024, 12:03pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/15 "2024-09-19T12:03:10Z")

</div>

Hello, there is another question I would like to consult. Currently, the error is \>\>-- \>\> WARNING in subroutine OPEN3  
File not available.

\*\*\* ERROR ABORT in subroutine SubhFile\_Cell on PE 019  
Could not open CMAQ\_MASKS  
PM3EXIT: date&time specified as 0  
Date&time specified as 0

 ![bf4dd5b26100fa2c74d4f8880fcee8a](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/f79a3dbaa50c2a3c1408359c7e6b0f0eeeaa7326.png)

Should the CMAQ\_MASKS file be used to mark source emission areas, and what software should be used to create it

 ![41bd409c101bc79b2f6f5afa9a665b7](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/9/907eab6a9ccc20b9585f690312393c654e3f1d84.png)

---

<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: [September 19, 2024, 12:55pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/16 "2024-09-19T12:55:19Z")

</div>

If you do not define any region-specific sensitivity parameters in your sensinput.dat control file, you will not need to define a CMAQ\_MASKS file in your CCTM run script and you then also should not uncomment any lines referring to CMAQ\_MASKS in the `&Desid_RegionDef` section of CMAQ\_Control\_DESID.nml

If you do want to specify sensitivity parameters for specific regions, you will need to set these variables and point them to a corresponding file defining these regions. Region files used in DESID emissions scaling as well as DDM-3D and ISAM are described in [Appendix B](https://github.com/USEPA/CMAQ/blob/main/DOCS/Users_Guide/Appendix/CMAQ_UG_appendixB_emissions_control.md#b342-defining-regions).

You can also search this forum for previous threads discussing approaches to create such files by using a search term of “mask” or “region”, e.g. [here](https://forum.cmascenter.org/t/how-to-make-isam-regions-file/2877) or [here](https://forum.cmascenter.org/t/whats-the-maskdatas-format/2919)

---

<div class="post-metadata">

### Author: ![LMZ](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@LMZ](https://forum.cmascenter.org/u/LMZ)
#### Post date: [September 19, 2024, 1:24pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/18 "2024-09-19T13:24:56Z")

</div>

First of all, thank you very much for your professional reply. Now I use the DDM module of CMAQ to invert gridded emissions, and finally I want to obtain the sensitivity analysis of grid to grid. In this case, is it necessary to turn on this setting? Now I have turned off this setting, but the operation still reports errors: The ERROR is \*\*\* ERROR ABORT in subroutine DESID\_INIT\_REGIO on PE 029  
User specified DDM3D region - PA - not found in available emissions regions. Check sensinput.dat file  
PM3EXIT: DTBUF 0:00:01 Jan. 1, -000  
Date and time 0:00:01 Jan. 1, -000 ( 1:000001)  
(END)  
This error is not reported without DDM. This error is reported with DDM module

---

<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: [September 19, 2024, 1:46pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/19 "2024-09-19T13:46:55Z")

</div>

If you do not want any region-specific sensitivity parameters, you should not have any “REGION” entry in the sensinput.dat file specified in your run script. The structure of sensinput.dat is described [here](https://github.com/USEPA/CMAQ/blob/main/DOCS/Users_Guide/CMAQ_UG_ch10_HDDM-3D.md#10321-ddm-3d-control-file-format) as well as the bottom of the example sensinput.dat file distributed with the code and notes under item 6 that the REGION section is optional.

I am guessing you are working off of the example sensinput.dat file distributed with the CMAQ benchmark case. That example does define two-region specific parameters, one for region “PA” (the state of Pennsylvania) and one for region “NJ” (the state of New Jersey).

To adapt this example to your case, you will have to remove the lines

> REGION  
> PA  
> REGION  
> NJ

If you do want to define regions, you’ll have to refer to them by the region label names defined in CMAQ\_Control\_DESID.nml, mapped from the variable names in your MASK file.

---

<div class="post-metadata">

### Author: ![LMZ](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@LMZ](https://forum.cmascenter.org/u/LMZ)
#### Post date: [September 19, 2024, 2:16pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/20 "2024-09-19T14:16:51Z")

</div>

Thank you again for your professional answer. At present, delete it or report an ERROR: \*\*\* ERROR ABORT in subroutine DESID\_INIT\_REGIO on PE 031  
User specified DDM3D region - PA - not found in available emissions regions. Check sensinput.dat file  
PM3EXIT: DTBUF 0:00:01 Jan. 1, -000  
Date and time 0:00:01 Jan. 1, -000 ( 1:000001)  
(END)  
Thank you again for your professional answer. At present, delete it or report an ERROR: \*\*\* ERROR ABORT in subroutine DESID\_INIT\_REGIO on PE 031  
User specified DDM3D region - PA - not found in available emissions regions. Check sensinput.dat file  
PM3EXIT: DTBUF 0:00:01 Jan. 1, -000  
Date and time 0:00:01 Jan. 1, -000 ( 1:000001)  
(END), I want to identify the concentration of HCHO (formaldehyde) column by VOC emission and NO2 concentration by NOX emission.The current sensinput.2018\_12NE3.dat was modified by me as follows:

 ![b786175d0043ebf9cc5b685d6af7ac0](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/6/67febde7fb612ace8cc56f69160793da99a2bacd.png)  
 ![e58578d8f8e776bb22ab530d895c711](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/d/db2fac611246f9c31b26824132416961cff7cf46.png)

---

<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: [September 19, 2024, 2:35pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/21 "2024-09-19T14:35:31Z")

</div>

Could you please post your actual sensinput file and your log file with the error message(s) as attachments? Including the error messages in the text of your post and looking at multiple screenshots without being certain of their order makes it harder to debug the problem.

---

<div class="post-metadata">

### Author: ![LMZ](https://avatars.discourse-cdn.com/v4/letter/l/a587f6/32.png) [@LMZ](https://forum.cmascenter.org/u/LMZ)
#### Post date: [September 19, 2024, 3:44pm UTC](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005/22 "2024-09-19T15:44:56Z")

</div>

Thank you very much for your suggestion. Here is my file.  
[CTM\_LOG\_031.v54\_intel\_d01\_20170129.txt](https://forum.cmascenter.org/uploads/short-url/kZm903sUWp61RD2V2a7qMV4ikzH.txt) (11.1 KB)  
[sensinput.2018\_12NE3.txt](https://forum.cmascenter.org/uploads/short-url/xLDvfvcsSMpy6W9bIcdgfZg4d4U.txt) (2.4 KB)

[Next page](https://forum.cmascenter.org/t/fail-to-generate-the-asens-file-in-cmaq-ddm-v5-4/4005.md?page=2)
