payload: {"action":"created","issue":{"url":"https://api.github.com/repos/landlab/landlab/issues/922","repository_url":"https://api.github.com/repos/landlab/landlab","labels_url":"https://api.github.com/repos/landlab/landlab/issues/922/labels{/name}","comments_url":"https://api.github.com/repos/landlab/landlab/issues/922/comments","events_url":"https://api.github.com/repos/landlab/landlab/issues/922/events","html_url":"https://github.com/landlab/landlab/issues/922","id":440016633,"node_id":"MDU6SXNzdWU0NDAwMTY2MzM=","number":922,"title":"DepressionFinderAndRouter hangs when nodata nodes set to inactive","user":{"login":"AlexLipp","id":10188895,"node_id":"MDQ6VXNlcjEwMTg4ODk1","avatar_url":"https://avatars3.githubusercontent.com/u/10188895?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexLipp","html_url":"https://github.com/AlexLipp","followers_url":"https://api.github.com/users/AlexLipp/followers","following_url":"https://api.github.com/users/AlexLipp/following{/other_user}","gists_url":"https://api.github.com/users/AlexLipp/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexLipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexLipp/subscriptions","organizations_url":"https://api.github.com/users/AlexLipp/orgs","repos_url":"https://api.github.com/users/AlexLipp/repos","events_url":"https://api.github.com/users/AlexLipp/events{/privacy}","received_events_url":"https://api.github.com/users/AlexLipp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"SiccarPoint","id":6867260,"node_id":"MDQ6VXNlcjY4NjcyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6867260?v=4","gravatar_id":"","url":"https://api.github.com/users/SiccarPoint","html_url":"https://github.com/SiccarPoint","followers_url":"https://api.github.com/users/SiccarPoint/followers","following_url":"https://api.github.com/users/SiccarPoint/following{/other_user}","gists_url":"https://api.github.com/users/SiccarPoint/gists{/gist_id}","starred_url":"https://api.github.com/users/SiccarPoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiccarPoint/subscriptions","organizations_url":"https://api.github.com/users/SiccarPoint/orgs","repos_url":"https://api.github.com/users/SiccarPoint/repos","events_url":"https://api.github.com/users/SiccarPoint/events{/privacy}","received_events_url":"https://api.github.com/users/SiccarPoint/received_events","type":"User","site_admin":false},"assignees":[{"login":"SiccarPoint","id":6867260,"node_id":"MDQ6VXNlcjY4NjcyNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6867260?v=4","gravatar_id":"","url":"https://api.github.com/users/SiccarPoint","html_url":"https://github.com/SiccarPoint","followers_url":"https://api.github.com/users/SiccarPoint/followers","following_url":"https://api.github.com/users/SiccarPoint/following{/other_user}","gists_url":"https://api.github.com/users/SiccarPoint/gists{/gist_id}","starred_url":"https://api.github.com/users/SiccarPoint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SiccarPoint/subscriptions","organizations_url":"https://api.github.com/users/SiccarPoint/orgs","repos_url":"https://api.github.com/users/SiccarPoint/repos","events_url":"https://api.github.com/users/SiccarPoint/events{/privacy}","received_events_url":"https://api.github.com/users/SiccarPoint/received_events","type":"User","site_admin":false},{"login":"gregtucker","id":7528207,"node_id":"MDQ6VXNlcjc1MjgyMDc=","avatar_url":"https://avatars2.githubusercontent.com/u/7528207?v=4","gravatar_id":"","url":"https://api.github.com/users/gregtucker","html_url":"https://github.com/gregtucker","followers_url":"https://api.github.com/users/gregtucker/followers","following_url":"https://api.github.com/users/gregtucker/following{/other_user}","gists_url":"https://api.github.com/users/gregtucker/gists{/gist_id}","starred_url":"https://api.github.com/users/gregtucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregtucker/subscriptions","organizations_url":"https://api.github.com/users/gregtucker/orgs","repos_url":"https://api.github.com/users/gregtucker/repos","events_url":"https://api.github.com/users/gregtucker/events{/privacy}","received_events_url":"https://api.github.com/users/gregtucker/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2019-05-03T12:08:05Z","updated_at":"2019-06-06T16:09:33Z","closed_at":"2019-06-06T16:09:33Z","author_association":"NONE","body":"I'm attempting to perform a landscape evolution model on real topgraphic data but having issues with DepressionFinderAndRouter causing the script to hang when nodata values are set to inactive.\r\n\r\nI'm loading in a topographic .asc file ([topo_SW_clip.zip](https://github.com/landlab/landlab/files/3141670/topo_SW_clip.zip)) from SRTM30 for the SW of England (attached) as a model grid. This is clipped so that areas which are in the sea are given -9999 values. This topography is then loaded into LandLab and I'm trying to apply the stream power law. However, noise in the topo has a series of depressions I want to fill in, but how I deal with the no-data values (-9999) can cause the DepressionFiller to seemingly crash.\r\n\r\n## Problem Example\r\n\r\nThe following code hangs:\r\n```\r\n#Load in topo\r\nmg,zr = read_esri_ascii(\"SW_preprocessing/topo_SW_clip.asc\",name='topographic__elevation')\r\n#Set ocean nodes to inactive\r\nmg.set_nodata_nodes_to_inactive(zr, -9999)\r\n\r\n#BCs\r\nmg.status_at_node[mg.nodes_at_left_edge] = FIXED_VALUE_BOUNDARY\r\nmg.status_at_node[mg.nodes_at_top_edge] = FIXED_VALUE_BOUNDARY\r\nmg.status_at_node[mg.nodes_at_bottom_edge] = FIXED_VALUE_BOUNDARY\r\n#Set eastern boundary to closed because of somerset (for now)\r\nmg.status_at_node[mg.nodes_at_right_edge] = CLOSED_BOUNDARY\r\n#Dirichlet boundary conditions\r\nzr[mg.boundary_nodes] = 0\r\n\r\nfrr = FlowAccumulator(\r\n    mg,\r\n    'topographic__elevation',\r\n    flow_director = 'FlowDirectorD8')\r\nfrr.run_one_step()\r\n\r\ndf = DepressionFinderAndRouter(mg)\r\ndf.map_depressions() #### <--- CRASH OCCURS HERE ####\r\nimshow_grid(mg,'is_pit')\r\n```\r\n### Error Message\r\nWhen I end the processing I get the following traceback: \r\nTraceback (most recent call last):\r\n\r\n```\r\n  File \"<ipython-input-58-feba3a1b9c19>\", line 18, in <module>\r\n    df.map_depressions()\r\n\r\n  File \"~/anaconda3/lib/python3.7/site-packages/landlab/components/flow_routing/lake_mapper.py\", line 939, in map_depressions\r\n    self._identify_depressions_and_outlets(reroute_flow)\r\n\r\n  File \"~/anaconda3/lib/python3.7/site-packages/landlab/components/flow_routing/lake_mapper.py\", line 848, in _identify_depressions_and_outlets\r\n    self.find_depression_from_pit(pit_node, reroute_flow)\r\n\r\n  File \"~/anaconda3/lib/python3.7/site-packages/landlab/components/flow_routing/lake_mapper.py\", line 791, in find_depression_from_pit\r\n    nodes_this_depression\r\n\r\n  File \"~/anaconda3/lib/python3.7/site-packages/landlab/components/flow_routing/lake_mapper.py\", line 433, in find_lowest_node_on_lake_perimeter\r\n    or self.flood_status[nbr] == _FLOODED\r\n```\r\nThe same thing happens if the nodata nodes are set to be closed via `mg.set_nodata_nodes_to_closed(zr, -9999)`.\r\nI don't really want them closed because it's unrealistic but it's interesting that it gives the same results. Is there a similar function for setting no data nodes to be a `FIXED_VALUE_BOUNDARY`? \r\n\r\n## Hacky solution\r\n\r\nHowever when the sea nodes are set to 0 (manually), the Depression Finder does successfully complete. This is a hacky solution and does produce meaningful results on the land and I can just end up clipping this in postprocessing. However, it does mean that rivers end up flowing over what in reality is the ocean, which isn't great. I don't like this solution because it's a bit of a hackjob, although it does produce the correct(ish) results. Ideally I want to model the nodes which correspond to no-data to either be inactive or set to be fixed value boundaries, but this causes the depression router to crash.\r\n\r\n```\r\nmg,zr = read_esri_ascii(\"SW_preprocessing/topo_SW_clip.asc\",name='topographic__elevation')\r\n\r\nsea_nodes = np.where(zr == -9999.0)\r\nzr[sea_nodes] = 0\r\n\r\nmg.status_at_node[mg.nodes_at_left_edge] = FIXED_VALUE_BOUNDARY\r\nmg.status_at_node[mg.nodes_at_top_edge] = FIXED_VALUE_BOUNDARY\r\nmg.status_at_node[mg.nodes_at_bottom_edge] = FIXED_VALUE_BOUNDARY\r\nmg.status_at_node[mg.nodes_at_right_edge] = CLOSED_BOUNDARY\r\nzr[mg.boundary_nodes] = 0\r\n\r\nfrr = FlowAccumulator(\r\n    mg,\r\n    'topographic__elevation',\r\n    flow_director = 'FlowDirectorD8')\r\nfrr.run_one_step()\r\n\r\ndf = DepressionFinderAndRouter(mg)\r\ndf.map_depressions()\r\nimshow_grid(mg,'is_pit')\r\n```\r\n\r\n## Questions \r\n\r\nSo to summarise \r\n1) Why does the depression router hang when no data nodes are set to inactive nodes or closed? \r\n\r\n2) Is there an equivalent function to ` set_nodata_nodes_to_closed` but for `FIXED_VALUE_BOUNDARY`.\r\n\r\nThanks all! Apart from this, everything looks great.\r\n"},"comment":{"url":"https://api.github.com/repos/landlab/landlab/issues/comments/499562433","html_url":"https://github.com/landlab/landlab/issues/922#issuecomment-499562433","issue_url":"https://api.github.com/repos/landlab/landlab/issues/922","id":499562433,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5OTU2MjQzMw==","user":{"login":"AlexLipp","id":10188895,"node_id":"MDQ6VXNlcjEwMTg4ODk1","avatar_url":"https://avatars3.githubusercontent.com/u/10188895?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexLipp","html_url":"https://github.com/AlexLipp","followers_url":"https://api.github.com/users/AlexLipp/followers","following_url":"https://api.github.com/users/AlexLipp/following{/other_user}","gists_url":"https://api.github.com/users/AlexLipp/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexLipp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexLipp/subscriptions","organizations_url":"https://api.github.com/users/AlexLipp/orgs","repos_url":"https://api.github.com/users/AlexLipp/repos","events_url":"https://api.github.com/users/AlexLipp/events{/privacy}","received_events_url":"https://api.github.com/users/AlexLipp/received_events","type":"User","site_admin":false},"created_at":"2019-06-06T16:09:33Z","updated_at":"2019-06-06T16:09:33Z","author_association":"NONE","body":"Hi all, \r\n\r\nYes this has worked fine. Thank you! \r\nClosing this now. "}}
other: {"actor":{"display_login":"AlexLipp"}}