# Questions about creating OMI files

**URL:** <https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153>\
**Category:** CMAQ\
**Created:** [August 19, 2024, 1:40pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153 "2024-08-19T13:40:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [August 19, 2024, 1:40pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/1 "2024-08-19T13:40:27Z")

</div>

[run\_create\_omi.csh](https://forum.cmascenter.org/uploads/short-url/xUcuKrAK4hZfSbgh6biCbNlvZus.csh) (4.7 KB)  
Hello, everyone.  
I’m having trouble creating the OMI file. Since the default OMI file for CMAQ v5.4 only provides data from 1979 to 2019. Considering that I need data for 2020, I am using /PREP/create\_omi/scripts/run\_create\_omi.csh to create a new OMI file. However, when the script was executed, the OMI file for 2020 was not created. The script, log, and the List file have been uploaded. Thanks in advance for any advice and help.  
[run\_create\_omi.csh](https://forum.cmascenter.org/uploads/short-url/xUcuKrAK4hZfSbgh6biCbNlvZus.csh) (4.7 KB)  
[toms\_list.dat.txt](https://forum.cmascenter.org/uploads/short-url/fWRarikOLPRVZuYylqjXsI3jyk.txt) (2.4 KB)  
[run\_create\_omi.log.txt](https://forum.cmascenter.org/uploads/short-url/y5O7ZaEmZ3wiD6DyZccqNlvdpSU.txt) (5.6 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 27, 2024, 1:25pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/2 "2024-08-27T13:25:46Z")

</div>

Do you have all of the input data downloaded? It appears that you have 12 datasets, but you should have 520 files.

```auto
cd TOMS_OMI_O3_column/2020
ls *.txt | wc
    520 520 14040

```

Please rerun the following script and verify that all of the input datasets are downloaded.

```auto
./get_toms_data.q

```

---

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [August 28, 2024, 12:43pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/3 "2024-08-28T12:43:19Z")

</div>

Dear lizadams,  
Thanks for your help. I apologise for uploading the wrong file. I double-checked and made sure I did have 520 files. However, after running run\_create\_omi.csh, I only get a normal file called ‘toms\_list.dat’ and an empty file called ‘omi\_full\_2020.dat’. I notice that the log file alerts me to ‘Above errors found in OMI\_FILE\_LIST’, but I don’t know exactly what this error refers to. I would be grateful if you could give some advice. The script and log have been uploaded.  
Thanks so much!  
[run\_create\_omi.csh.txt](https://forum.cmascenter.org/uploads/short-url/1PYNsIj4hrbat8n8e41cjxwZY0Z.txt) (4.7 KB)  
[toms\_list.dat.txt](https://forum.cmascenter.org/uploads/short-url/dpzLCrMCgQUBeqWMQbGiMd2jaK9.txt) (114.8 KB)  
[run\_create\_omi.log.txt](https://forum.cmascenter.org/uploads/short-url/jlia53k8H9sr5Ux0k1mopXdUXRR.txt) (118.0 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:10pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/4 "2024-08-28T16:10:48Z")

</div>

Please verify what version of CMAQ you are using, as these OMI scripts are under the CCTM/PREP directory.

Please follow the instructions available in this tutorial:

> <https://github.com/USEPA/CMAQ/blob/main/PREP/create_omi/README.md>

I believe this error indicates that you to clean up the input files as instructed.

---

<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:39pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/5 "2024-08-28T16:39:56Z")

</div>

Another solution is to download the OMI file for 2020 created by EPA available on the CMAS AWS s3 bucket:

[https://2020platform.s3.amazonaws.com/index.html#2020platform/12US1/omi/](https://2020platform.s3.amazonaws.com/index.html#2020platform/12US1/omi/)

Liz

---

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [August 29, 2024, 4:59am UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/6 "2024-08-29T04:59:37Z")

</div>

Dear lizadams,  
Thank you so much! The version of CMAQ I’m using is v4.5.I’m sure the OMI scripts are under the CCTM/PREP directory.I’ve installed the OMI tool a few times as you suggested but the results are the same as before.The rest of CMAQ works fine and outputs reasonable results. Therefore, I am not going to go ahead and create the 2020 OMI file myself. I am going to use the files directly from your link. Thanks again for your help.  
Haorui Wang

---

<div class="post-metadata">

**Author:** ![bhutzell](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bhutzell](https://forum.cmascenter.org/u/bhutzell)\
**Post date:** [August 29, 2024, 4:39pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/7 "2024-08-29T16:39:30Z")

</div>

I checked the upload toms\_list.dat.txt. If the file is @whr’s toms\_list.dat, the file should not have its first line because the line is equivalent to the run-script’s _ls_ command listing the TOMS data files. I’m not uncertain why the run-script added the line to the file. You may try removing the _set echo_ commands near line 9 and 18 in run\_create\_omi.csh.

Note that OMI\_FILE\_LIST is the environment variable used by the create\_omi program to open and read the oms\_list.dat file.

---

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [August 31, 2024, 5:14am UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/8 "2024-08-31T05:14:34Z")

</div>

Dear bhutzell,  
Thank you very much for your help. Sorry for such a late reply, I have been testing based on your suggestions. According to your suggestions, I removed the set echo commands near line 9 and 18 in run\_create\_omi.csh. I am so happy because it works! However, after visualising it, I noticed that the ozone distribution seems to be wrong (The first figure is for the first day, i.e. 20190901; and the second figure is for the 300th day, i.e. 20200701). I only uploaded a partial screenshot as the full OMI file is too large. I thought that maybe I set the wrong NLAT\_OMI and NLON\_OMI. but after I changed NLAT\_OMI and NLON\_OMI several times, I found that the ozone distribution is always wrong. I am very confused. I will appreciate if you can give me some suggestions.

 ![cmaq-first-day-20190901](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/2/2413e242aa5e62bab23632f328c30f4440b589cd.jpeg)  
 ![cmaq-300th-day-20200701](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/7/7b41ce9ef9f2f84a655c9331b704c3b17efd558b.jpeg)  
[run\_create\_omi.csh.txt](https://forum.cmascenter.org/uploads/short-url/1QuECaKARGYkWS8V5aCLibX921I.txt) (4.7 KB)  
[toms\_list.dat.txt](https://forum.cmascenter.org/uploads/short-url/tnNLiTmkKql8gw0dDkCXEsPP3ey.txt) (57.4 KB)

Haorui Wang

---

<div class="post-metadata">

**Author:** ![bhutzell](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@bhutzell](https://forum.cmascenter.org/u/bhutzell)\
**Post date:** [September 3, 2024, 6:44pm UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/9 "2024-09-03T18:44:18Z")

</div>

The odd patterns result because the satellite is missing observations at numerous latitude-longitude points across the globe on these days. The create\_omi tool handles missing observations by using the last available observation at a location. However, previous observations are not available on the first day of data so the tool uses mean values over all the data files and the ozone column can shows more odd patterns. The polar regions suffer from long periods of missing observations because of polar night. Note that missing observation become more apparent when output files have a higher resolution over the latitude-longitude grid.

The create\_omi tool allows seeing where observations are missing when the run-script option FULL\_FILES equal T. The option produces output files at the data’s full resolution over latitude and longitude. The omi\_full\_ **YEAR**.ncf file (_ **YEAR** equals 2020 in the case._) has a variable called O3\_MISSING showing where observations are missing. It equals 1.0 for missing observations. Otherwise, the variable equals -1.0. The below plots give examples of O3\_MISSING’s values.

 ![omi_full_ozone_missing_2019-09-01](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/c/cc6a9cb69bbfad6c0819ffb86c71f3b8504d7bca.png)  
 ![omi_full_ozone_missing_2020-07-01](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/e/eac2f666d6cad47671dbd6c95ab427b8ad06917c.png)

---

<div class="post-metadata">

**Author:** ![whr](https://avatars.discourse-cdn.com/v4/letter/w/22d042/32.png) [@whr](https://forum.cmascenter.org/u/whr)\
**Post date:** [September 4, 2024, 8:15am UTC](https://forum.cmascenter.org/t/questions-about-creating-omi-files/5153/10 "2024-09-04T08:15:04Z")

</div>

Dear bhutzell,

Thank you very much for your help. It is so clear!

Haorui Wang  
2024.9.4
