# Runoff Raster Layer Calculator 10.4

Question asked by sarahdawson2 on Jun 1, 2017
Latest reply on Jun 2, 2017 by xander_bakker

I'm trying to create a runoff layer using this equation:

Q = (P – 0.2S)2 / (P + 0.8S)

The S in this equation is a soil retention layer that I made using this equation with curve numbers:

S = (1000.0 / CN) – 10.0

P, in this instance, is rainfall total for the storm-- in this case, a one-year storm for the watershed I am studying. I only have one value for P (3.01).

The soil retention layer is working, but the runoff layer isn't going through. I keep getting this error message when I type out the equation: "Error 000989: Python syntax error; parsing error; SyntaxError: invalid syntax (Line 1).

The instructions I have are part of a lab, and they also have this addendum:

"Use the S layer along with the P value to compute a Q layer, a cell by cell runoff layer from the 1-year storm. Use the standard equation below (assumes “normal soil moisture at the beginning of the storm”): Q runoff (inches) P rainfall total for the storm (inches) VERY IMPORTANT: Runoff does not start until P is greater than 0.2S. If P < 0.2S, then Q=0. You will need to set runoff to “0” in cells where P < 0.2S. Note the raster calculator Con function is helpful here."

So i'm not sure where to go from here, since everything I have tried thus far, including the usage of the Con function, have not worked. Any suggestions are welcome!