Open HamishB opened 3 years ago
Yes, we only read in the portion of the domain that intersects with the bbox. A buffer is a good idea when reading the DEM.
Also, just a commentary I wouldn't interpolate from the gdat
object. I would interpolate from the original DEM at the DEM's native resolution.
The idea being that the gdat
may downsample the DEM to match the minimum mesh resolution depending on available memory.
Hi,
around half the time I run
m = interp(m, gdat);
on a high res. inset mesh I get NaNs sneaking intom.b
. Sometimes even two of them. This happens at nodes which end up just ever so slightly outside the bbox, even though there is valid elevation data in the gdat DEM well beyond the given bbox. If the (possibly massive) DEM is being clipped to the bbox, perhaps a small buffer area could be added to the clipping box? e.g. 1% of the width or height of the bbox or an extra row/column or two of the DEM grid.(often the bottom right corner, but not always)
dumb work-around: just re-run
mshopts.build.grd
untilsum(isnan(m.b))
== 0.thanks, Hamish