Closed kbartelt closed 6 years ago
The program is expecting the input to have all of the following fields: "oCC_EX", "oCC_PT", "oPC_Score", "iPC_ModLU", and "iPC_HighLU"
"oCC_EX" and "oCC_PT" are created in Step 5: BRAT Combined Dam Capacity Model. If one of them are missing, I'd advise running that step again.
"oPC_Score" is created during Step 6: BRAT Conflict Potential. If this field is missing, I'd advise running that step again.
"iPC_ModLU" and "iPC_HighLU" are created in Step 2: BRAT Table. If they're missing, my guess is that you ran BRAT Table without giving it a land use raster. It's an optional input, but apparently something later on relies on it, so maybe we should make it required. Something to think about in the future.
@kbartelt, can you let me know which of these is missing, and if so, if running it again fixed it? It's possible that something went wrong somehow in these steps. I haven't seen it happen before, but we've been discovering all sorts of new bugs this last week, so it wouldn't surprise me.
thank you @banderson1618. My input file was missing "iPC_ModLU" and "iPC_HighLU". I re-ran Step 2:BRAT Table and made sure to include the LANDFIRE EVT as my land use raster but these 2 fields were still not created.
When I compare my LANDFIRE raster with one for a different watershed, the only column missing is CODE. Is this a field I need to enter manually like with VEG_CODE, LU_CODE, and LUI_Class?
No, the "CODE" field shouldn't matter. Do you have any other iPC attributes in the output? I'm running the dataset you linked to see if I get the same problem, and I'll report back if I figure out what's wrong.
Okay sounds good. Yes, there is iPC_RoadX, iPC_RoadAd, iPC_Canal, and iPC_LU.
I think I found the problem. Change the field named "LUI_Class" to "LUI_CLASS", and that should work. Apparently, the if condition is case sensitive. Let me know if it works.
The reverse may actually be the problem (so, change "LUI_CLASS" to "LUI_Class"). I'm working on a fix that will make it no longer case sensitive, but until then, this is a quick fix.
Changing the field to Class instead of CLASS worked, thanks!
@banderson1618 something to note- the instructions on the BRAT tutorial page use LUI_CLASS instead of LUI_Class which resulted in that error above! This may not matter if you are changing the code but I wanted to let you know. Thanks!
http://brat.riverscapes.xyz/Documentation/Tutorials/StepByStep/2-Preprocessing.html
The documentation for pyBRAT isn't the best, I admit. I appreciate you pointing out places where it needs improvement, even though it shouldn't matter now.
@banderson1618 @bangen I am attempting to complete a provisional run for Tamales-Drake Bays (18050005) for #97 and am getting the following error during step 7. Has anyone come across this error before/ have suggestions for fixing it?
My thoughts for potential issues:
For this watershed there were no railroads within the watershed boundary. I did not input anything for rails data. Step 7 uses the BRAT Conflict Potential model as an input and so I tried adding a column "IPC_RR" to the Conflict Potential model attribute table but still get the same error.
This is also the first watershed for which I have prepped the LANDFIRE/Roads/Rails data myself so it is very possible I did something wrong during this step
The files I am using are here: https://usu.box.com/s/3y0ytuxn9wx2lgd29g78dj6lyyz9va8z
Thanks in advance for the help!