Skip to content

Generalize inlet coordinates and flow direction#324

Open
elbeejay wants to merge 6 commits into
DeltaRCM:developfrom
elbeejay:issue-241
Open

Generalize inlet coordinates and flow direction#324
elbeejay wants to merge 6 commits into
DeltaRCM:developfrom
elbeejay:issue-241

Conversation

@elbeejay

@elbeejay elbeejay commented Jul 7, 2026

Copy link
Copy Markdown
Member

This PR introduces the ability to configure custom inlet coordinates and flow direction. It adds the inlet_x, inlet_y, and inlet_flow_dir parameters, enabling inlets to be positioned at arbitrary locations with varying flow vectors instead of the default fixed behavior on the first grid row. Closes #241.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.28571% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.51%. Comparing base (2965c34) to head (393a7bc).

Files with missing lines Patch % Lines
pyDeltaRCM/model.py 91.89% 3 Missing ⚠️
pyDeltaRCM/init_tools.py 95.83% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #324      +/-   ##
===========================================
+ Coverage    91.47%   91.51%   +0.03%     
===========================================
  Files           12       12              
  Lines         2791     2851      +60     
===========================================
+ Hits          2553     2609      +56     
- Misses         238      242       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread pyDeltaRCM/water_tools.py
Comment on lines +117 to +119
self.qxn.flat[start_inlets] += start_counts * self.inlet_flow_dir[0]
self.qyn.flat[start_inlets] += start_counts * self.inlet_flow_dir[1]
self.qwn.flat[start_inlets] += start_counts * (self.Qp_water / self._dx / 2)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking for confirmation that this change in the index is correct; I'm not sure why we used to index for self.qxn with start_inlets and then start_indices for self.qwn...

@elbeejay
elbeejay marked this pull request as ready for review July 23, 2026 01:43
@elbeejay
elbeejay requested a review from amoodie July 23, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting starting cells for parcels implicitly assumes that inlet is located along x=0 coordinate

1 participant