Deltares / Deltares/imod-python

Stream Flow Routing (SFR)

Open
#1,430 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
41
Forks
12
Avg merge
21h 8m
Merged PRs (30d)
1

Description

I took a look at the SFR package in the weekend, a few notes:

  • For connection data (from reach to reach), an xugrid method was still missing - I've added directed_edge_to_edge_connectivity to xugrid for this (still unreleased).
  • The latest version of MODFLOW 6 appears to have new SFR features in the form of diversions and profiles (storage profiles), but these aren't well documented yet
  • For diversions and profiles, it could be useful to create helper classes similar to those used for lakes
  • But for now, we'll leave that out since I don't think the table formats are even properly documented(?)
  • Furthermore, the period data has a very peculiar structure, where updates are specified per parameter

A package with basic functions is relatively straightforward: you use the edge centroids to find in which cell a reach is located, and then you write all the input (just like Well).

A bit more logic is required to do assignment to any grid; the network needs to be intersected with a (2D) grid.
This isn't that hard to do, numba_celltree already has the intersection logic. I.e. a regrid method might not work; but I don't think this is strictly necessary: if the user's network topology is fine enough, it'll go just fine. (In case of a coarse network, the exchange with the groundwater just ends up being very "patchy" and physically non-sensical -- a surface water every 5th groundwater cell or so -- but the model should run fine.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing SFR package and the Well implementation referenced in the issue, then review how xugrid connectivity and numba_celltree grid intersections could be used. The scope is not settled: the basic input-writing functions, arbitrary-grid assignment, and possible diversion or profile helpers are discussed but not selected, so completion criteria need clarification.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.