# The SA create shapefile failure, but it is no other error message

**URL:** <https://forum.cmascenter.org/t/the-sa-create-shapefile-failure-but-it-is-no-other-error-message/2352>\
**Category:** Spatial Allocator\
**Created:** [May 20, 2021, 2:47pm UTC](https://forum.cmascenter.org/t/the-sa-create-shapefile-failure-but-it-is-no-other-error-message/2352 "2021-05-20T14:47:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geek](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@geek](https://forum.cmascenter.org/u/geek)\
**Post date:** [May 20, 2021, 2:47pm UTC](https://forum.cmascenter.org/t/the-sa-create-shapefile-failure-but-it-is-no-other-error-message/2352/1 "2021-05-20T14:47:47Z")

</div>

![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/0/09607e7d27d6f1a98c5250c5eca5ec810cfd9f29.png)

- Can someone give me a hint，Thx

---

<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:** [May 21, 2021, 5:25pm UTC](https://forum.cmascenter.org/t/the-sa-create-shapefile-failure-but-it-is-no-other-error-message/2352/2 "2021-05-21T17:25:39Z")

</div>

Please provide the following information to help us debug this issue:

I added the answers based on the log file you provided, but please verify that this is correct.

1. The Spatial Allocator Script you are running

## **generateGridShapefile.csh**

1. The inputs to the script you are using
2. Commands you are using to submit the job. Are you running interactively, submitting to a queue?
3. Describe what you are trying to do.

The default script provided with Spatial Allocator is available here:

> <https://github.com/CMASCenter/Spatial-Allocator/blob/master/raster_scripts/generateGridShapefile.csh>

It uses the following settings:  
setenv GRID\_PROJ “+proj=lcc +a=6370000.0 +b=6370000.0 +lat\_1=33 +lat\_2=45 +lat\_0=40 +lon\_0=-97”  
setenv GRID\_ROWS 299  
setenv GRID\_COLUMNS 459  
setenv GRID\_XMIN -2556000.0  
setenv GRID\_YMIN -1728000.0  
setenv GRID\_XCELLSIZE 12000  
setenv GRID\_YCELLSIZE 12000  
setenv GRID\_SHAPEFILE\_NAME ../output/conus\_cmaq12km.shp

You are using  
rows=65  
cols=99  
lat\_1=36, lat\_2=46, lat\_0=42 log\_0=126  
xmin=-1097000.00  
ymin=-1347000.00  
xCellsize=27000.00  
yCellsize=27000.00

t looks like you are specifying a 27km x 27km in the xCellsize, yCellsize, but generating output for a 12km shapefile. Can you try renaming the output shapefile, and then rerunning the script.  
setenv GRID\_SHAPEFILE\_NAME ../output/conus\_cmaq27km.shp

Perhaps there is a permission issue in deleting the provided conus\_cmaq12km.shp file in the output directory.  
Please also verify that there is an output directory one level up from where you are running the script.

---

<div class="post-metadata">

**Author:** ![geek](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@geek](https://forum.cmascenter.org/u/geek)\
**Post date:** [May 26, 2021, 1:19pm UTC](https://forum.cmascenter.org/t/the-sa-create-shapefile-failure-but-it-is-no-other-error-message/2352/3 "2021-05-26T13:19:53Z")

</div>

emmm,this is also what I ran with the script below, without any other hints. 😨

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/f/ffc60ec4e171c014ca782680fe6ebd841a7d5249.png)
