# Error in subroutine LOAD\_CSQY\_DATA in CMAQV5.4

**URL:** <https://forum.cmascenter.org/t/error-in-subroutine-load-csqy-data-in-cmaqv5-4/5176>\
**Category:** CMAQ\
**Created:** [August 28, 2024, 12:20am UTC](https://forum.cmascenter.org/t/error-in-subroutine-load-csqy-data-in-cmaqv5-4/5176 "2024-08-28T00:20:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamid](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hamid](https://forum.cmascenter.org/u/Hamid)\
**Post date:** [August 28, 2024, 12:20am UTC](https://forum.cmascenter.org/t/error-in-subroutine-load-csqy-data-in-cmaqv5-4/5176/1 "2024-08-28T00:20:54Z")

</div>

Hello all,

I am trying to run CMAQV5.4 with 2017gb emission files that I prepared for a custom domain but I come across a problem with the photolysis reaction data. I built the cmaq with cb6r3\_ae7 to be consistent with the EPA 2017’s platform but when I execute the run\_cctm.csh script, it always crashes at reading the reactions from the CSQY\_DATA files with the following error:

```
>>--->>WARNING in subroutine LOAD_CSQY_DATA on PE 014
 WARNING: JTABLE mechanism is for CB6R3_AE7_AQ but gas chemistry name is CB6R5_AE7_AQ
  >>--->> WARNING in subroutine LOAD_CSQY_DATA on PE 014
 FATAL ERROR: photolysis reaction FORM_R_IUPAC13 not found in the reference data!
 
 
 >>--->> WARNING in subroutine LOAD_CSQY_DATA on PE 014
 FATAL ERROR: photolysis reaction FORM_M_IUPAC13 not found in the reference data!
 
 
 >>--->> WARNING in subroutine LOAD_CSQY_DATA on PE 014
 FATAL ERROR: photolysis reaction ALD2_R_IUPAC13 not found in the reference data!
 
 
 >>--->> WARNING in subroutine LOAD_CSQY_DATA on PE 014
 FATAL ERROR: photolysis reaction ALDX_R_IUPAC13 not found in the reference data!
 
 
 >>--->> WARNING in subroutine LOAD_CSQY_DATA on PE 014
 FATAL ERROR: photolysis reaction GLYD_IUPAC13 not found in the reference data!
 
 
 >>--->> WARNING in subroutine LOAD_CSQY_DATA on PE 014
 FATAL ERROR: photolysis reaction GLY_R_IUPAC13 not found in the reference data!
 

 *** ERROR ABORT in subroutine LOAD_CSQY_DATA on PE 014  
 The above fatal error(s) found in CSQY data!
 PM3EXIT: date&time specified as 0
 Date&time specified as 0

```

It appears that there is an inconsistency between the gas chemistry and the mechanism table of CSQY\_DATA which is set to cb6r3 but I am not sure why gas chemistry is still cb6r5 even after configuring cmaq to cb6r3?  
Could any one please help me to deal with this error?  
the CMAQ logfiles and the build.cfg are attached.  
[cctm\_2017\_3km\_mvrd.log.txt](https://forum.cmascenter.org/uploads/short-url/AbGJnoo57bGeHQbKIk4p5L94plA.txt) (15.8 KB)  
[CCTM\_v54.cfg.txt](https://forum.cmascenter.org/uploads/short-url/zbItERRaB5eSDZSPS96bFVOAZHU.txt) (3.6 KB)  
[CTM\_LOG\_014.v54\_gcc\_3km\_mvrd\_20170101.txt](https://forum.cmascenter.org/uploads/short-url/eSadpNxIAMojlovE3OmLBcIvt9q.txt) (179.5 KB)

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [August 28, 2024, 4:19pm UTC](https://forum.cmascenter.org/t/error-in-subroutine-load-csqy-data-in-cmaqv5-4/5176/2 "2024-08-28T16:19:19Z")

</div>

Changing the mechanism requires modifying and then re-running the bldit script.

```auto
 setenv Mechanism cb6r3_ae7_aq #> chemical mechanism (see $CMAQ_MODEL/CCTM/src/MECHS) 

```

One way to track what mechanism was used to create your cmaq executable is to modify the buildit script as follows:

Change the following lines:

```auto
#> Set and create the "BLD" directory for checking out and compiling
#> source code. Move current directory to that build directory.
 if ( $?Debug_CCTM ) then                  
    set Bld = $CMAQ_HOME/CCTM/scripts/BLD_CCTM_${VRSN}_${compilerString}_debug
 else
    set Bld = $CMAQ_HOME/CCTM/scripts/BLD_CCTM_${VRSN}_${compilerString}
 endif

```

to use the following, adding environment variables to label the build directory.

```auto
#> Set and create the "BLD" directory for checking out and compiling 
#> source code. Move current directory to that build directory.
 if ( $?Debug_CCTM ) then
    set Bld = $CMAQ_HOME/CCTM/scripts/BLD_CCTM_${VRSN}_${compilerString}_${Mechanism}_${DepMod}_debug
 else
    set Bld = $CMAQ_HOME/CCTM/scripts/BLD_CCTM_${VRSN}_${compilerString}_${Mechanism}_${DepMod}
 endif

```

You will then need to specify this build directory name in your run script to use the CMAQ model executable that was built to match your run script options.

---

<div class="post-metadata">

**Author:** ![Hamid](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@Hamid](https://forum.cmascenter.org/u/Hamid)\
**Post date:** [August 29, 2024, 12:45am UTC](https://forum.cmascenter.org/t/error-in-subroutine-load-csqy-data-in-cmaqv5-4/5176/3 "2024-08-29T00:45:17Z")

</div>

Thank you very much @lizadams! I managed to run the model after the rebuilt.

Cheers, Hamid
