# Could not open ISAM\_REGIONS

**URL:** <https://forum.cmascenter.org/t/could-not-open-isam-regions/2039>\
**Category:** CMAQ-ISAM\
**Created:** [January 29, 2021, 7:36am UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039 "2021-01-29T07:36:00Z")\
**Posts on this page:** 6\
**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:** [January 29, 2021, 7:36am UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039/1 "2021-01-29T07:36:00Z")

</div>

Dear all,  
I’m trying to run CMAQ\_ISAM but I got an error message in my LOG file(see below), the model doesn’t seem to find ISAM region file. I make sure I provided the right path. Does anyone know why?

```
      Error reading IDs for variable CD CN CB CQ YX
 netCDF error number -49 processing file "ISAM_REGIONS"
 NetCDF: Variable not found

 *** ERROR ABORT in subroutine SubhFile_Cell on PE 001
 Could not open ISAM_REGIONS

```

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

Yunqing

[run.txt](https://forum.cmascenter.org/uploads/short-url/4A1tJZJiYlHAzutwJnoaNBKLeRS.txt) (12.0 KB)

---

<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:** [January 29, 2021, 1:49pm UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039/2 "2021-01-29T13:49:19Z")

</div>

The errors you posted point to a problem with reading variables from the ISAM\_REGIONS file, not with not being able to find the file. Looking at that error message, the code is looking for a variable named “CD CN CB CQ YX” while you probably want it to be looking for five different variables named CD, CN, CB, CQ, and YX. To help us diagnose this further, please post your EmissCtrl file, your isam\_control file, and the header of our ISAM\_REGIONS file obtained with ncdump -h.

The final error message you encountered “Could not open ISAM\_REGIONS” is misleading in this case, I will flag it for the developers to have a look at.

---

<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:** [February 1, 2021, 1:12am UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039/3 "2021-02-01T01:12:10Z")

</div>

Hello Hogrefe,  
Sorry for the late reply. Attached are the files you asked for.  
[EmissCtrl\_cb6r3\_ae7\_aq.txt](https://forum.cmascenter.org/uploads/short-url/2vgZfWUYG3eht3oUlSq8jiPvcwb.txt) (31.4 KB) [isam\_control.txt](https://forum.cmascenter.org/uploads/short-url/lyMcNCIw2vAyMoPI2PqRcPizc6D.txt) (4.4 KB) [ISAM\_REGIONS.txt](https://forum.cmascenter.org/uploads/short-url/7UBNZdmh1mVi3GPKBJcCWp2HWrg.txt) (1.9 KB)  
Yunqing

---

<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 1, 2021, 2:34am UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039/4 "2021-02-01T02:34:05Z")

</div>

Thanks for posting these files.

Looking at the header of the ISAM\_REGIONS file you posted as ISAM\_REGIONS.txt file, it seems the file does not fully comply with I/O API conventions, leading to an error when CMAQ tries to read from it.

Specifically, since variable names in I/O API have a length of 16 characters (including spaces), the VAR-LIST attribute cannot be " CD CN CB CQ YX YD OT " since it needs to contain 16 characters (including spaces) for each variable and have a length of NVARS x 16. You can look at the headers of MCIP files for examples of properly constructed VAR-LIST attributes. It also appears that a number of the attributes in your file that should be of type integer (FTYPE, GDTYP, NVARS, STIME, SDATE, etc.) are of type real which may also cause problems.

Generally, it is strongly advised to use Fortran code linking in the I/O API libraries or programs from I/O API’s M3tools to create CMAQ input files such as this one to ensure that they comply with I/O API standards. There are a number of other threads discussing this topic:

> [@CMAQV5.3 ISAM Region not found](https://forum.cmascenter.org/t/cmaqv5-3-isam-region-not-found/1418/10):
>
> Yukui, A quick solution is to “borrow” the meta data. This solution assumes your new data is the same shape and consistent with the spatial domain in the borrowed meta data. For now, I assume you are using files with only one variable. This could be modified for multiple variables. Each step includes code that can be used from the command line. Make your mask with ncl (hereafter /path/to/nclmask.nc) Copy an existing IOAPI compliant mask file cp /path/to/existing/ioapimask.nc /path/to/ne…

> [@Error creating GRIDMASK](https://forum.cmascenter.org/t/error-creating-gridmask/1254):
>
> Hi all~ I am trying to generate my own GRIDMASK since I use other emission inventory instead of EDGAR. I wrote a f90 file to generate a GRIDMASK file. But when SMOKE was reading the GRIDMASK, the error shows up: Value for PROMPTFLAG: N returning FALSE Error reading IDs for variable TZONES netCDF error number -49 processing file “GRIDMASK” NetCDF: Variable not found Could not open file “GRIDMASK”. I guess the error is caused by the global attribute I wrote into GRIDMASK, which is VAR…

---

<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:** [February 1, 2021, 3:19am UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039/5 "2021-02-01T03:19:56Z")

</div>

Thanks for your help, I will check my ISAM\_REGION file for this problem.  
Yunqing

---

<div class="post-metadata">

**Author:** ![qinch18](https://avatars.discourse-cdn.com/v4/letter/q/71e660/32.png) [@qinch18](https://forum.cmascenter.org/u/qinch18)\
**Post date:** [July 27, 2021, 8:02am UTC](https://forum.cmascenter.org/t/could-not-open-isam-regions/2039/6 "2021-07-27T08:02:34Z")

</div>

Hello，  
Could you please share the specific method.
