Select to view content in your preferred language

Conditional in 10

465
0
03-27-2013 06:56 AM
DavidMick
Emerging Contributor
I am having trouble understanding the syntax of Con using Python in version 10.  Previously, I used the following to determine cells with inudation greater than 0.1 feet and set those cell values to the inundation depth by subtracted the ground elevation from the water elevation.  Cells that didn't meet this condition are set to null. 

inund = con(wtr_grid - ground_grid > 0.1, wtr_grid - ground_grid, setnull(wtr_grid))

I would like to do the same in 10 using Python, but can not seem to make Con perform in a similar way.  Has any one worked through this type of Conditional statement?
0 Kudos
0 Replies