I am trying to create a Python script to calculate the volume of sediment required for a marsh creation project. I've implemented the steps in the attached .py file. The data needed to run the script is in the .zip folder.
The code is written in Python 3. I am using ArcPro 2.6.0 (though I updated it today during my troubleshooting). I have been loading the code into Arc by right clicking in an Arc Python window.
The code has run through with no issues several times, but then I started having problems getting it to complete. There were no major changes to the code between when it worked and when I started having issues.
The first problem was that Arc was executing a random number of steps before stopping mid script with no error. If I then copy and paste each successive line into the Python window, it runs. Most often Arc was exiting after executing line 52:
deep_water = Minus(mwl,dem), but not always.
ArcPro wanted me to update. So I tried that. And started having a different version of the same problem.
The script started exiting after line 48: fill_depth = Minus(mc_raster,dem), again no error and not always. In addition, The raster does not display and although it has symbology defined as
, the statistics are
Once, the script ran to completion after the second error started occurring. Surprisingly the answer seemed correct.
Restarting Arc does not seem to have any effect on the problem. With no error messages, I'm lost as to where the problem could be happening. Any suggestions are appreciated.