mHM initialization fails for small basins: percentile_0d_dp: n < 2
Hi @thober @shresthp (cc @kaluza) [update 6.7.2020]
After re-running all the 5000+ global basins with the latest mHM develop setup, routing process = 3;
20% of the basin runs are broken during the mRM initialization due to percentile_0d_dp: n < 2
That was not the case earlier (with revision 8271b546 and routing process = 2).
Initially I thought it came with with the bugfix in ./src/mRM/mo_mrm_net_startup.f90
saying:
! Stephan Thober, Pallav Kumar Shrestha, Sep 2020 - bug fix in cut off Length at 40 percentile, neglecting links with -9999. that occur if multiple outlets are present
lines 1434-1438:
! cut off Length at 40 percentile to neglect short paths in headwaters
if ((processMatrix(8, 1) .eq. 2) .or. (processMatrix(8, 1) .eq. 3)) then
length = percentile(pack(nLinkLength(:), nLinkLength(:) .ge. 0._dp), 40._dp)
nLinkLength(:) = merge(nLinkLength(:), length, (nLinkLength(:) .gt. length))
end if
But it looks the reason is elsewhere, after rolling it back prior the aforementioned bugfix. Any hints appreciated (? @kaluza )
Thanks, Olda