# Errors when running Spatial Allocator

**URL:** <https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061>\
**Category:** Spatial Allocator\
**Tags:** cmaq\
**Created:** [November 13, 2025, 4:08am UTC](https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061 "2025-11-13T04:08:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuoXianhao](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuoXianhao](https://forum.cmascenter.org/u/GuoXianhao)\
**Post date:** [November 13, 2025, 4:08am UTC](https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061/1 "2025-11-13T04:08:10Z")

</div>

Dear Sir or Madam,

I would like to include sea-salt emissions in my CMAQ model. According to the official documentation, this requires generating an **OCEAN file** using the **Spatial Allocator** software. However, I have encountered a series of issues while running the program.

First, the input Shapefile I used is a global ocean shapefile (in .shp format) to which I added a **SURF\_ZONE** field. I will also provide the information from the corresponding **.prj** file. The **GRIDDESC.txt** file was generated by MCIP and contains the grid information for CMAQ. The two files have different spatial resolutions.

When I run the program, it crashes and stops automatically. I will attach the run script and other related files. Could you please advise me on how to fix these problems? In addition, I would like to know if there are other ways to include sea-salt emission data in CMAQ.

Thank you very much for your help.

Best regards,

PROJCS[“LCC”,GEOGCS[“GCS\_WGS\_1984”,DATUM[“D\_WGS\_1984”,SPHEROID[“WGS\_1984”,6378137.0,298.257223563]],PRIMEM[“Greenwich”,0.0],UNIT[“Degree”,0.0174532925199433]],PROJECTION[“Lambert\_Conformal\_Conic”],PARAMETER[“False\_Easting”,0.0],PARAMETER[“False\_Northing”,0.0],PARAMETER[“Central\_Meridian”,101.738],PARAMETER[“Standard\_Parallel\_1”,30.0],PARAMETER[“Standard\_Parallel\_2”,60.0],PARAMETER[“Scale\_Factor”,1.0],PARAMETER[“Latitude\_Of\_Origin”,36.493],UNIT[“Meter”,1.0]]

[alloc\_surf\_zone\_to\_oceanfile.csh](https://forum.cmascenter.org/uploads/short-url/x28WrUZGa8WEwRUJnDm2r4X3d3b.csh) (1.5 KB)

[GRIDDESC.txt](https://forum.cmascenter.org/uploads/short-url/43Z1Oel343Bv4qfFImC9jJM2Wd5.txt) (197 Bytes)

 ![e7aa2e1bbb9506c2566e93086158bc9a](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/5/5d435804382daec14842c439320b60b931d36d28.png)

 ![e2ed82f59e22f612141f0107171da89a](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/d/dd431af76115abea3e042b9449d8f57e608f9848.png)

 ![e99e709c30a3d90c610d6d7bd37a1686](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/5/51e67a6915080f8fac2b35518e721d61a739ec88.png)

---

<div class="post-metadata">

**Author:** ![james.beidler](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@james.beidler](https://forum.cmascenter.org/u/james.beidler)\
**Post date:** [November 13, 2025, 9:38pm UTC](https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061/2 "2025-11-13T21:38:04Z")

</div>

Your warning specifically points to the ALLOC\_ATTR\_TYPE not being set prior to running the Spatial Allocator. Please verify that this gets set (e.g. echo back).

I can’t tell from the image if the grid cells are part of your shapefile. The surf zone shapefile should only include land area polygons that extend to the ocean shores. Are you able to run the Spatial Allocator with the provided example surf zone shapefile described in the CMAQ documentation (surfzone\_poly\_st.shp)?

---

<div class="post-metadata">

**Author:** ![GuoXianhao](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuoXianhao](https://forum.cmascenter.org/u/GuoXianhao)\
**Post date:** [November 17, 2025, 1:20pm UTC](https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061/3 "2025-11-17T13:20:05Z")

</div>

Sir, thank you very much for your reply.

After reviewing the documentation again, I realized that the shapefile does not need to contain all ocean areas; it only needs to include the near-shore coastal zone. I re-generated a new shapefile in ArcGIS, created a field named **SURF\_ZONE** , and assigned all values to **1**. I also modified the script accordingly, and the output file was successfully generated.

I would like to ask you to help me interpret the run log.  
In addition, I would like to know what characteristics the output file should have so that I can confirm it is correct.

Finally, I would like to ask: if I do not plan to simulate DMS and only need sea-salt emissions, is this output file already sufficient to be used by CMAQ?

Thank you, and I look forward to your guidance.

[alloc\_surf\_zone\_to\_oceanfile.csh](https://forum.cmascenter.org/uploads/short-url/bfkwo4G20Flfe5680Fl45NfGgZG.csh) (1.4 KB)

[log.txt](https://forum.cmascenter.org/uploads/short-url/wjIjlgLp4cePqQWMhTkBKPbUGz6.txt) (5.9 KB)

---

<div class="post-metadata">

**Author:** ![GuoXianhao](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuoXianhao](https://forum.cmascenter.org/u/GuoXianhao)\
**Post date:** [November 17, 2025, 1:41pm UTC](https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061/4 "2025-11-17T13:41:33Z")

</div>

When I input this file into CMAQ, it tells me that the variable _OPEN_ is missing. How should I generate the _OPEN_ variable? Thank you very much.

```auto
 "OCEAN_1" opened as OLD:READ-ONLY   
 File name "/home/guoxh/SpatialAllocatorMaster/Spatial-Allocator-master/output//ocean_file_202301.ncf"
 File type GRDDED3 
 Execution ID "????????????????"
 Grid name "202301"
 Dimensions: 161 rows, 183 cols, 1 lays, 1 vbles
 NetCDF ID: 1048576 opened as READONLY            
 Time-independent data.
 
 >>--->> WARNING in subroutine XTRACT3
 Requested variable OPENnot available in file OCEAN_1which contains variables:
 
 SURF_ZONE_1

 *** ERROR ABORT in subroutine retrieve_ocean_d on PE 021
 Could not read OPEN from OCEAN_1

```

* * *

---

<div class="post-metadata">

**Author:** ![GuoXianhao](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@GuoXianhao](https://forum.cmascenter.org/u/GuoXianhao)\
**Post date:** [November 24, 2025, 8:21am UTC](https://forum.cmascenter.org/t/errors-when-running-spatial-allocator/6061/5 "2025-11-24T08:21:19Z")

</div>

Could you possibly tell me the location and names of the shapefiles required to generate the OCEAN file in the official documentation? Thank you very much.
