# Fail to read emission file

**URL:** <https://forum.cmascenter.org/t/fail-to-read-emission-file/2852>\
**Category:** I/O API\
**Created:** [December 2, 2021, 9:39am UTC](https://forum.cmascenter.org/t/fail-to-read-emission-file/2852 "2021-12-02T09:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmbmnb](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bmbmnb](https://forum.cmascenter.org/u/bmbmnb)\
**Post date:** [December 2, 2021, 9:39am UTC](https://forum.cmascenter.org/t/fail-to-read-emission-file/2852/1 "2021-12-02T09:39:04Z")

</div>

Dear all,

I’m using python netCDF4 to prepare CMAQ emission files, but the model couldn’t read.  
So I tried Matlab and I got the same error, too.Here is the error message:

```
 netCDF error number -49 processing file "GR_EMIS_001"
 NetCDF: Variable not found

 *** ERROR ABORT in subroutine gridded_files_se on PE 001
 Could not open GR_EMIS_001 file

```

PM3EXIT: date&time specified as 0  
Date&time specified as 0

Does anyone know how to fix this?

Yunqing

[CTM\_LOG\_001.v533\_intel\_d02\_20210727.txt](https://forum.cmascenter.org/uploads/short-url/caDdm0PUQOcIVVBwAbJJ6arvERX.txt) (8.3 KB)  
[emis.txt](https://forum.cmascenter.org/uploads/short-url/6hzld1XugZPN2aqdplv67PjNiPb.txt) (5.4 KB)

---

<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:** [December 2, 2021, 12:50pm UTC](https://forum.cmascenter.org/t/fail-to-read-emission-file/2852/2 "2021-12-02T12:50:34Z")

</div>

From the I/O API home page [https://cjcoats.github.io/ioapi/index.html](https://cjcoats.github.io/ioapi/index.html) or [https://www.cmascenter.org/ioapi/documentation/all\_versions/html/index.html](https://www.cmascenter.org/ioapi/documentation/all_versions/html/index.html):

> **The Models-3 I/O API is A programming interface, not a data format !!**  
> _ **I/O API files are not synonymous with “netCDF files” !!** _

and treating it as a data format is **NOT SUPPORTED** : you don’t know the internal data structures used to protect the integrity of the data and you clearly got it wrong.

By analogy, do you attempt to write _MS-Word_ documents with a hex editor? You don’t know the internal data structures there, either.

---

<div class="post-metadata">

**Author:** ![bmbmnb](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bmbmnb](https://forum.cmascenter.org/u/bmbmnb)\
**Post date:** [December 3, 2021, 1:49am UTC](https://forum.cmascenter.org/t/fail-to-read-emission-file/2852/3 "2021-12-03T01:49:47Z")

</div>

Thank you @cjcoats !

After your reply, I used python to create my CMAQ emission files according to GRIDDED IOAPI Files format and it worked!  
IOAPI/NetCDF restrictions link is below:

> <https://github.com/john-science/python_for_scientists/blob/master/classes/14_netcdf/lecture_14.md>

Yunqing
