OR-Dept-Environmental-Quality / TTools

TTools
GNU General Public License v3.0
4 stars 1 forks source link

Step 4 not recording topographic shade values #2

Open coltenelkin opened 4 months ago

coltenelkin commented 4 months ago

Ran into an issue in step 4 where the columns of topographic shade angles were zeros at each node (or at every node except for the first). Spent some time chasing down the reason why and came up with an acceptable fix. As best I can tell, the program isn't flipping the last_sample variable (first encountered around line 510) from False to True, which means that the node number never gets added to the list of nodes_to_update, which means that the node is never updated. I solved this with two main changes:

First, I manually set the last_sample variable to True. This means that each node will be updated each block.

Second, I changed the block_size variable to 50 in the user input section, which is a large enough block that I'll only have one instead of an iterable list of blocks. My understanding is that the blocks were set at 5km to handle memory issues. In the case of my computer, setting it to 50km didn't affect performance nor throw an error. Relatedly, I expect that most modern machines could handle the larger block size.

I still need to investigate the True/False switch that dictates which nodes get updated when so that, should the need arise, the block iteration can proceed as originally design.