Skip to content

updates to use time fron NGEN#8

Open
mkarim-rtx wants to merge 10 commits into
developmentfrom
handle_time_outside_bmi_config_mohammed
Open

updates to use time fron NGEN#8
mkarim-rtx wants to merge 10 commits into
developmentfrom
handle_time_outside_bmi_config_mohammed

Conversation

@mkarim-rtx
Copy link
Copy Markdown

@mkarim-rtx mkarim-rtx commented Apr 21, 2026

https://jira.nextgenwaterprediction.com/browse/NGWPC-10207

Centralizing time control via NGen across UEB, TopoFlow-Glacier, and Noah-OWP

This task standardizes how simulation time (start, end, timestep) is handled across multiple models—UEB, TopoFlow-Glacier, and Noah-OWP-Modular—by shifting control from model-specific configuration files to the NGen Framework.

Objective

Ensure all models:

Ignore hardcoded config time (start/end/dt)
Use NGen-provided realization time dynamically via BMI
Maintain compatibility with existing workflows with minimal code changes

What was done

  1. NGen (Core Change)
    Added logic to pass realization time through BMI inputs:
    start_utime
    end_utime
    dt_seconds
    Ensures a single source of truth for time control
    Applies uniformly across all BMI models

PR: NGWPC/ngen#172

  1. UEB
    Replaced reliance on config timing with runtime override
    Implemented:
    Temporary rewrite of UEB control file before Initialize()
    Injected NGen time into rewritten file
    Result:
    UEB runs using NGen time without modifying original config
    Zero changes required in UEB internal physics

PR: NGWPC/ueb_bmi#14

  1. TopoFlow-Glacier
    Added full BMI-level time handling:
    adapter_set_realization_times()
    _apply_realization_time_from_strings()
    Logic:
    Prefer NGen time if provided
    Fallback to config only if missing
    Result:
    Fully decoupled from YAML time configuration
    Works seamlessly with NGen forcing window

  2. Noah-OWP
    Removed dependency on internal RunModule time handling
    Implemented:
    BMI-side apply_realization_time_config logic
    Updated NamelistRead.f90:
    Made startdate and enddate optional
    Added placeholder defaults instead of fatal error

Result:
Model initializes without config time
Real time applied later via BMI inputs from NGen
Why this change was needed

Before
Each model:
Required its own config-based time
Could conflict with NGen realization
Caused errors or inconsistencies

After
NGen controls time globally
Models become:
Consistent
Easier to integrate
Less error-prone

Final Outcome
All three models now:
Use NGen-driven time
Do not require config start/end dates
Maintain backward compatibility via fallbacks
Eliminates duplicated logic and synchronization issues across models

@mkarim-rtx mkarim-rtx marked this pull request as draft May 1, 2026 19:15
Copy link
Copy Markdown

@jswade-rtx jswade-rtx left a comment

Choose a reason for hiding this comment

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

With Mohammed's updates to noah-owp-modular and ngen, I was able to run a noah-owp formulation after removing the start and end time from the bmi config file. I also successfully ran a calibration + validation + forecast workflow to demonstrate the time handing updates to the forcing configs.

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.

2 participants