ERROR 000539: Raster Calculator in Model Builder

1725
1
09-22-2017 04:27 PM
MichelleTanner2
New Contributor

the red highlighted tool is where I am getting the error. but #s 1-4 also use Raster CalculatorHello,

I am trying to run Raster Calculator in Model Builder, however I am getting what looks like two errors after my model reaches a certain step. I'm not sure if it is a syntax issue or something else.. Raster Calculator is used in earlier steps in the same model with no problem. Could someone please help with my syntax? Below is what I wrote:

  (Power("%P95%"-"%Ia%"*"%S05g%",2)) /("%P95%"+(0.95*"%S05g%"))

Note: P95 and Ia are parameters, and S05g is a dataset raster that is calculated in the previous step. 

I then get this error message:

ERROR 000539: Error running expression: rcexec() Traceback (most recent call last):  File "<expression>", line 1, in <module>  File "<string>", line 5, in rcexec  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Functions.py", line 4485, in Times    in_raster_or_constant2)  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Utils.py", line 53, in swapper    result = wrapper(*args, **kwargs)  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Functions.py", line 4482, in Wrapper    ["Times", in_raster_or_constant1, in_raster_or_constant2])RuntimeError: ERROR 000732: Input Raster: Dataset 0.05 does not exist or is not supported

Failed to execute (calculate Q95g).

What's going on here? I originally wrote the expression with '**' instead of 'Power(,)', but that also presented me with the same error. I am using ArcGIS Pro 2.0 if that helps. 

Thanks!  

0 Kudos
1 Reply
curtvprice
MVP Esteemed Contributor

Note: P95 and Ia are parameters, and S05g is a dataset raster that is calculated in the previous step.
...
ERROR 000732: Input Raster: Dataset 0.05 does not exist or is not supported

If P95 and Ia are numbers they should not have quotes around them. You have Raster Calculator looking for a raster layer or dataset named ".05". This may work better.  

(Also check the parentheses I added to the left expression -- the parentheses I added will make it work the way you wrote it.)

Power(%P95% - (%Ia% * "%S05g%"), 2) / (%P95% + (0.95 * "%S05g%"))