n-dim / ecohydraulical-feedback

ecohydraulical feedback model for simulation of banded vegetation pattern formation
1 stars 2 forks source link

topography output is NaN #15

Closed n-dim closed 11 years ago

n-dim commented 11 years ago

currently the output toptography.csv contains only NaN. I have to figure out since when this is the case and revert the changes.

n-dim commented 11 years ago

I'm glad that it wasn't my fault. Subroutine Erosion() was never working properly, but it was deactivated. But when I rewrote the input read routine I activated it. This was the point when the NaNs in topography appeared.

What I figured out, was that flowResistance1 was not initialized with random values. So flowResistance1 was 0 on the whole raster. This caused problems calculating erosion resulting in NaNs or Infinity+-values in the raster cells of topog. What I changed is: flowResitance1 = flowResistance0 in setInitConditions() so we don't have only random initial topog but also random initial flowResistance

@gmcgrath: you should check if this change is consistent with the theoretical concept of the simulation. I wouldn't say that I understand it thoroughly enough!