I have a code that calculates the sum of water recharge for a pixel for a 9 year period (This piece of code works fine, just thought I would show how it is made just in case. The values range from 0 to 207379mm per 1km cell):

1 Answer
1

You get this error if you are trying to write to a location already containing a dataset of the specified name or if the raster format can't take the range of values. Also, the filename 'g_g5214' is the sort of name that ESRI gives temporary geoprocessing rasters.

So it is probably something about the conversion of your hydro-units data from a polygon vector to a temporary raster (on the fly) it doesn't like. You have quoted the size of the hydro_units but what about the total range of their values? If you have a very large number of hydro_units whose values are auto-generated ids, you could be over-running the range allowed by the GRID format (though you would need a very large number of zones to do this as the GRID format can be either 16 or 32 bits - that said, I have done it on occasion, so it's quite possible).

There are only 190 units. The odd thing is this works when run straight through arcmap, and model builder. But even the python code export from model builder complains. This is arc 10.1.
–
mmann1123Feb 19 '13 at 15:25

have you checked to see if there is a 'g-g5214' file sitting in your destination folder (perhaps after a crash). I would expect Arc you create a new name for the temporary file but if it isn't, an old file could be blocking the process. If that's the case, you could try adding "arcpy.OverwriteOutput = True" at the start of the code.
–
MappaGnosisFeb 19 '13 at 16:01

Anyone else running into this problem in 10.1? I have already tried OverwriteOutput = T and creating an empty scratch folder. Still getting the same error! Even when trying to raster.save in other scripts!!!!!!!!!! This is killing me
–
mmann1123Apr 22 '13 at 18:57