# Error when run edgar in smoke

**URL:** <https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740>\
**Category:** SMOKE\
**Created:** [August 26, 2020, 7:20am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740 "2020-08-26T07:20:20Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![xinshou6](https://avatars.discourse-cdn.com/v4/letter/x/58f4c7/32.png) [@xinshou6](https://forum.cmascenter.org/u/xinshou6)\
**Post date:** [August 26, 2020, 7:20am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/1 "2020-08-26T07:20:20Z")

</div>

hi,friends  
i run the edgar from the testcase.my problems:  
1.something defined in the assign file not exist in the folder,like REPCONFIG MET\_CRO\_2D MET\_DOT\_3D,do we not need them?  
2.in case of lacking memory,i changed:(1)ncols 18 ,nrows 18 in GRIDDESC ,SRGDESC,do i need to change GRID\_CRO?(2)leave one file in arinv.edgar.lst,(3)change assign as:  
setenv G\_STDATE 2005709 # Julian start date  
setenv G\_STTIME 000000 # start time (HHMMSS)  
setenv G\_TSTEP 60000 # time step (HHMMSS)  
setenv G\_RUNLEN 250000 # run length (HHMMSS)  
setenv ESDATE 20050709 # Start date of emis time-based files/dirs  
setenv MSDATE 20050709 # Start date of met time-based files  
setenv NDAYS 1 # Duration in days of each emissions file  
setenv MDAYS 1 # Duration in days of met time-based files  
setenv YEAR 2005 # Base year for year-specific files  
what i did,is anything wrong? is that helpful to reduce the memory need or not? anything else like Temporal,gridmask, speciation,cut inventory half ?  
error i got in smkinv:  
File “ARINV” opened for input on unit: 97  
/usr/local/smoke/data/inventory/nei2005/edgar/arinv.edgar.lst  
Value for WKDAY\_NORMALIZE: N returning FALSE  
NOTE: Setting inventory to use full-week normalizer for weekly profiles  
\*\*\* ERROR ABORT in subroutine SMKINVEN:CHECKMEM  
Failure allocating memory for “CEXTORL”: STATUS= 5014  
i searched the forum found its about memory,is it? unlimted didnt work.  
Thanks for your time.

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [October 5, 2020, 2:33pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/2 "2020-10-05T14:33:53Z")

</div>

Sorry for the delay on our response but can you give me an update whether you still have this issue or not?

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [November 30, 2020, 5:12am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/3 "2020-11-30T05:12:34Z")

</div>

Hi.  
I have recieved the same error while run EDGAR in smoke.

\*\*\ ***ERROR ABORT in subroutine SMKINVEN:CHECKMEM**  
**Failure allocating memory for “CEXTORL”: STATUS= 5014**

I have split those EDGAR inventories by sectors. And I added _limit stacksize unlimited_ in my _.cshrc_ .

Here is my log file[smkinven.edgar.BRW.log.txt](https://forum.cmascenter.org/uploads/short-url/n1ZhD4AgsO0VZawcsIhEqCTerEz.txt) (5.2 KB)

BTW, can SMOKE use the **monthly data provided by EDGAR**? Should I just write the file path in the _arinv.edgar.lst_, or do I need to change somthing in _ASSIGN file_ as well ?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [November 30, 2020, 1:01pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/4 "2020-11-30T13:01:31Z")

</div>

What compiler and versions? These status-numbers are compiler dependent.

Assuming _gfortran_, that probably means you are trying to allocate an array too large for your current executable’s memory model – see [https://cjcoats.github.io/ioapi/AVAIL.html#medium](https://cjcoats.github.io/ioapi/AVAIL.html#medium)

It may work to re-compile smkinven with the medium memory model (`BIN=Linux2_x86_64gfort_medium, Linux2_x86_64ifort_medium`, or `Linux2_x86_64pg_medium`) and see if that works. And try this on a machine with lots of RAM and _memoryuse unlimited_ (not just stacksize…)

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [November 30, 2020, 1:28pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/5 "2020-11-30T13:28:33Z")

</div>

Before recompiling, try to run it with more RAM memory since it requires lots of memory due to its size of files.

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [November 30, 2020, 1:53pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/6 "2020-11-30T13:53:30Z")

</div>

Also, there could be an issue with your arinv.edgar.lst file, and that’s close to where the log stopped. If adding memory doesn’t work please provide the file for review.

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [November 30, 2020, 2:17pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/7 "2020-11-30T14:17:58Z")

</div>

Thanks for your reply! @cjcoats @bbaek@eyth.alison

Here are the compiler I use and the versions of the softwares:

> gnu/4.8.5  
> mvapich2/2.3  
> netcdf/4.3.0  
> hdf5/1.8.20  
> zlib/1.2.7

I think the HPC I use needs me to write a PBS job script to read large files and run the program.  
However, when I reduced the number of input files, a new problem appeared:

> ```
> Value for PROMPTFLAG: N returning FALSE
> Returning default value TRUE for query:
> "Continue with program?"
> Value for GRDMAT_ADJUST not defined;returning default: FALSE
> Value for GRDMAT_LINKDEFS not defined;returning default: FALSE
> Value for USE_VARIABLE_GRID not defined;returning default: FALSE
> Value for IMPORT_GRDNETCDF_YN: Y returning TRUE
> Value for SMK_SOURCE: 'A'
> Value for SMK_SOURCE: 'A'
> Value for PROMPTFLAG: N returning FALSE
> 
> ```
> 
> File “AREA” opened for input on unit: 98  
> /nuist/scratch/pb02005030/lism/v47\_smoke/data/inventory/BRW/area.map.edgar.BRW.txt
> 
> ```
> Value for AREA: '/nuist/scratch/pb02005030/lism/v47_smoke/data/inventory/BRW/area.map.edgar.BRW.txt'
> Value for AREA: '/nuist/scratch/pb02005030/lism/v47_smoke/data/inventory/BRW/area.map.edgar.BRW.txt'
> 
> *** ERROR ABORT in subroutine RDINVMAP
> Corrupted map formatted file - missing lines
> 
> ```

Thank you for your time !

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [November 30, 2020, 2:45pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/8 "2020-11-30T14:45:23Z")

</div>

Hi, regarding the new error:

We are interested in seeing the Smkinven log, the ARINV .lst file used by Smkinven, and the `area.map.edgar.BRW.txt `file.

This error is from Grdmat, but the AREA file causing the error is created by Smkinven, so it’s possible something went wrong in Smkinven…

Did you also try running Smkinven with the additional memory?

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [December 1, 2020, 5:39am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/9 "2020-12-01T05:39:33Z")

</div>

Hi, thank you for your reply!

It seems that I can’t enlarge the RAM, but I tried to recompile it with `-mcmodel=medium` in the _src/Makefile_ and still got the same error…

I found that after reducing the files, it appeared such words in foreground (shown below). Maybe this is the real reason why I got the error about AREA file.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/33bbc02f8fb8e0bdbf4328beb1a07582a689d64b.png)

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/15edb57d69773393591afdb17fd94d2ede8732ae.png)

And these are my log files  
[grdmat.edgar.BRW.Pol\_71N\_BRW.log.txt](https://forum.cmascenter.org/uploads/short-url/bPQJSSMYwlLw4b5jztReNZ9x1nd.txt) (3.4 KB) [smkinven.edgar.BRW.log.txt](https://forum.cmascenter.org/uploads/short-url/3A7OniMdqlvkzHbTZuMpGGuOQlt.txt) (7.5 KB) and list file [arinv.edgar.lst.txt](https://forum.cmascenter.org/uploads/short-url/6M9FVp0HpBWroU1OvzsRGzDvrXe.txt) (1.8 KB)

I can’t upload the _area.map.edgar.BRW_ beacause it is empty…

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [December 1, 2020, 1:42pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/10 "2020-12-01T13:42:21Z")

</div>

Hi.

I think there was a mistake in my previous _arinv.lst_. After I corrected it, there were no more error from SMKINVEN and GRDMAT.

But this showed up in _smkmerge_:

> ```
> "AGMAT" opened as OLD:READ-ONLY
> File name >"/nuist/scratch/pb02005030/lism/v47_smoke/data/run_ODE/static/agmat.edgar.Pol_71N_BRW.ODE.ncf"
> File type SMATRX3
> Execution ID "????????????????"
> Grid name "2019_BRW_CROSS"
> Dimensions: 39420 rows, 72405 cols, 1 lays, 1 vbles
> NetCDF ID: 196608 opened as READONLY
> Time-independent data.
> ASMAT :/nuist/scratch/pb02005030/lism/v47_smoke/data/run_ODE/static/asmat_l.edgar.cmaq_cb05_soa.ODE.ncf
> 
> >>--->> WARNING in subroutine OPENSET
> File not available.
> 
> Could not open file set "ASMAT".
> 
> ***ERROR ABORT in subroutine OPENMRGIN
> Could not open file set "ASMAT".
> 
> ```

Here is my new log file. [grdmat.edgar.BRW.Pol\_71N\_BRW.log.txt](https://forum.cmascenter.org/uploads/short-url/f5SZFRk4fx4CmqasgAsA5wYwmCc.txt) (13.6 KB) [smkinven.edgar.BRW.log.txt](https://forum.cmascenter.org/uploads/short-url/mk0S3e83JWhhnPQY5GefRIc6fS.txt) (27.9 KB) [smkmerge.edgar.BRW.20190328.Pol\_71N\_BRW.log.txt](https://forum.cmascenter.org/uploads/short-url/qUTuQj5rwnL4eODJLpTzJjdbyRH.txt) (10.1 KB)

BTW, there are many warnings in my _smkinven.edgar.BRW.log_ …

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [December 1, 2020, 9:46pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/11 "2020-12-01T21:46:34Z")

</div>

This is some good news that you have made progress. We note that the Smkmerge error is because the speciation matrix is missing. Assuming the end goal is speciated, hourly, model-ready emissions, you also need to run Spcmat and Temporal. There is a way to bypass those programs if they don’t want speciation or temporalization, via the MRG\_SPCMAT\_YN and MRG\_TEMPORAL\_YN settings: [https://www.cmascenter.org/smoke/documentation/4.5/html/ch06s14s03.html](https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.cmascenter.org%2Fsmoke%2Fdocumentation%2F4.5%2Fhtml%2Fch06s14s03.html&data=04%7C01%7CEyth.Alison%40epa.gov%7C999073fa3cae447c056d08d89603b83f%7C88b378b367484867acf976aacbeca6a7%7C0%7C0%7C637424289998813047%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2F0mDnK1dRmi%2FUVgt94jHnpjDUvTGgBR0Unarr0gfCs0%3D&reserved=0)

Note that EPA has a package posted for running SMOKE with hemispheric emissions including the EDGAR/HTAP inventories. Some of the scripts provided with this package may be helpful for you: ftp://newftp.epa.gov/Air/emismod/2011/hemispheric/

The 2016 hemispheric platform has a TSD posted, but note the data: [https://www.epa.gov/air-emissions-modeling/2016-hemispheric-emissions-modeling-platform](https://www.epa.gov/air-emissions-modeling/2016-hemispheric-emissions-modeling-platform)

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [December 3, 2020, 3:02am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/12 "2020-12-03T03:02:28Z")

</div>

Hi, Thank you for your reply!

I tried to set the MRG\_SPCMAT\_YN and MRG\_TEMPORAL\_YN to N, and leaved the RUN\_SPCMAT to Y. But I got an error from Spcmat (No other subroutine reported any error this time. ) :[spcmat.edgar.BRW.cmaq\_cb05\_soa.log.txt](https://forum.cmascenter.org/uploads/short-url/kqlkuLQHu1UceMsw2HCxzWK1k0W.txt) (11.1 KB)

> “TMP\_POL\_FILE” opened as OLD:READ-ONLY  
> File name “/nuist/scratch/pb02005030/lism/v47\_smoke/data/inventory/BRW/edgar.ODE\_dat/PMC.ncf”  
> File type GRDDED3  
> Execution ID “???”  
> Grid name “”  
> Dimensions: 2081258 rows, 1 cols, 1 lays, 7 vbles  
> NetCDF ID: 131072 opened as READONLY  
> Time-independent data.  
> Closing file TMP\_POL\_FILE  
> Reading source data from inventory file…  
> Generating unique lists from inventory data…  
> Reading speciation cross-reference file…  
> Number of inital xrefs: 0  
> Number of COMBO xrefs: 0  
> Number of FRACS xrefs: 0  
> **ERROR: No valid speciation cross-reference entries!**
> 
> ```
> *** ERROR ABORT in subroutine RDSREF
> Problem reading speciation cross-reference file.
> 
> ```

Is it because something wrong with my source classification codes (SCC) in ARINV? I would like to know what sectors are included in SMOKE.  
I have looked up the TSD you sent me, and I saw this:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/8d39909331f61ce900b7cff87071e29692d52ec6.png)  
Is that all the sectors listed?

In addition, do I need to change the GSREF and ATREF file?

Thank you so much for your time.

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [December 3, 2020, 3:47am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/13 "2020-12-03T03:47:50Z")

</div>

Based on the error message from your Spcmat log file, the following speciation cross-reference input file (GSREF) is missing during its run. Please check the file listed below is existed or not in your SMOKE location.

GSREF: /nuist/scratch/pb02005030/lism/v47\_smoke/data/ge\_dat/EDGAR/gsref.edgar.txt

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [December 3, 2020, 5:51am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/14 "2020-12-03T05:51:33Z")

</div>

Hi

I checked it in my SMOKE dir.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/8aac832c47bcaa3da6d6455bd8b891629a3ad897.png)

In the [spcmat.edgar.BRW.cmaq\_cb05\_soa.log.txt](https://forum.cmascenter.org/uploads/short-url/kqlkuLQHu1UceMsw2HCxzWK1k0W.txt) (11.1 KB) , there is no such error with any other chemical species (CO, NH3, NOx, SO2, PM2.5, PM10, VOC) except PMC.

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [December 3, 2020, 11:29am UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/15 "2020-12-03T11:29:06Z")

</div>

You need to check what kind of SCCs were used in your Smkinven run. Checkout the intermediate output file (ASCC) from Smkinven (Check Smkinven log file to locate this ASCC output file). This ASCC file contains the unique list of SCCs used in your Smkinven run. You need to make sure you use that SCCs in your GSREF input file to assign a proper specaition profile. In your GSREF file, “TRANSPORT” is one of SCCs used in GSREF input file. Check out [the format of GSREF](https://www.cmascenter.org/smoke/documentation/4.8/html/ch08s05s05.html#d0e44161) from SMOKE user’s guide.

---

<div class="post-metadata">

**Author:** ![simeng](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/simeng/32/960_2.png) [@simeng](https://forum.cmascenter.org/u/simeng)\
**Post date:** [December 3, 2020, 2:17pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/16 "2020-12-03T14:17:40Z")

</div>

Hi, thank you for your reply!  
I finally run the _smk\_BRW\_edgar.csh_ successfully! But while I tried to merge the files in _output/cmaq\_cb05\_soa_, a new error came out…

> ```
> "AGTS_L" opened as OLD:READ-ONLY
> File name "/nuist/scratch/pb02005030/lism/v47_smoke/data/run_ODE/output/cmaq_cb05_soa/agts_l.area.20190328.9.Pol_71N_BRW.ODE.ncf"
> File type GRDDED3
> Execution ID "????????????????"
> Grid name "2019_BRW_CROSS"
> Dimensions: 180 rows, 219 cols, 1 lays, 8 vbles
> NetCDF ID: 65536 opened as READONLY
> Time-independent data.
> Value for ADJ_FACS not defined; returning defaultval ': ' '
> Value for ADJ_FACS not defined; returning defaultval ': ' '
> NOTE : No adjustment factors were applied because there is no ADJ_FACS environment variable defined
> Value for TAG_SPECIES not defined; returning defaultval ': ' '
> Value for TAG_SPECIES not defined; returning defaultval ': ' '
> NOTE : No tagging species were available because there is no TAG_SPECIES environment variable defined
> NOTE: Grid settings initialized using FILE001 in
> gridded file.
> ERROR: At least two input files contain data for time periods that do
> not overlap. No output file can be created.
> 
> *** ERROR ABORT in subroutine SETOUTDATE
> Problem with input file time periods
> 
> ```

Or is it mean that I do not have to merge them?

Thank you so much for your help all these days!

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [December 3, 2020, 3:14pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/17 "2020-12-03T15:14:51Z")

</div>

Have you taken a look at any of our scripts for the 2011 platform that used HTAP data? That may give you some cludes.

---

<div class="post-metadata">

**Author:** ![bbaek](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/bbaek/32/22_2.png) [@bbaek](https://forum.cmascenter.org/u/bbaek)\
**Post date:** [December 3, 2020, 4:41pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/18 "2020-12-03T16:41:09Z")

</div>

Sounds like you are trying to run Mrggrid to merge multiple sectors output files. If the dates from those files are different, you need to set this flag called MRG\_DIFF\_DAYS to Y so then it can merge multiples gridded hourly emissions output files with different dates.  
But please make sure whether merging those different dates make sense and intentional or not.  
If you are interested in the complete set of HTAP/EDGAR gridded inventory processing, I would recommend you to follow the suggestion from @eyth.alison.

---

<div class="post-metadata">

**Author:** ![eyth.alison](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@eyth.alison](https://forum.cmascenter.org/u/eyth.alison)\
**Post date:** [December 3, 2020, 5:51pm UTC](https://forum.cmascenter.org/t/error-when-run-edgar-in-smoke/1740/19 "2020-12-03T17:51:00Z")

</div>

You need a special GSREF and GSPRO that can work with the EDGAR emissions. You can try pulling some files from 2011 hemispheric package on FTP since that is the most recent one we’ve posted: ftp://newftp.epa.gov/air/emismod/2011/hemispheric/ge\_dat\_for\_2011\_hemi\_speciation.zip
