Skip to content

Allow empty flow values in GPKG#4

Merged
ar-siddiqui merged 3 commits into
mainfrom
feature/allow-empty-flow-gpkgs
Jun 16, 2026
Merged

Allow empty flow values in GPKG#4
ar-siddiqui merged 3 commits into
mainfrom
feature/allow-empty-flow-gpkgs

Conversation

@ar-siddiqui

Copy link
Copy Markdown
Member

This PR deals with the scenario that when an unsteady model that has been cleaned for unsteady geom objects want to be executed through Ripple1D, can do so despite having no flow information.

This is the case with ohio_rfc model.

Comment thread ripple1d/ops/subset_gpkg.py Outdated
)
else:
logging.warning(
f"Skipping flow file validation as ignore_ras_flows is True. Received extension: {flow_file_extension} for submodel: {self.nwm_id}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: can we fix the indentation under else: so logging.warning(...) is indented consistently?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've fixed this indention.

Comment thread ripple1d/ops/subset_gpkg.py Outdated
f"Expected forcing extension to be .fxx, .uxx, or .qxx. Recieved {flow_file_extension} for submodel: {self.nwm_id}"
if not self.ignore_ras_flows:
raise ValueError(
f"Expected forcing extension to be .fxx, .uxx, or .qxx. Recieved {flow_file_extension} for submodel: {self.nwm_id}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo: Recieved should be Received

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've fixed this typo.

@mdeshotel mdeshotel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I added a TODO comment that I think would harden the code in the future. Probably 99% fine as is.

@mdeshotel
mdeshotel requested a review from biplovbhandari June 16, 2026 18:40
@ar-siddiqui
ar-siddiqui merged commit c495f5e into main Jun 16, 2026
6 checks passed
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.

3 participants