Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
043cd19
Map NHF hydrofabric to old field names
idtodd Mar 11, 2026
6bed386
Improved messaging for geopackage error handling
idtodd Mar 12, 2026
66b0169
Account for realization config json not including feature type prefix
idtodd Mar 18, 2026
3976d08
Change IIF to CASE for sqlite 3.26 support
idtodd Mar 25, 2026
a83fbb9
State saving for multi-BMI
idtodd Jan 16, 2026
3fab311
Cold start loading
idtodd Jan 20, 2026
19fd33d
Docker updates for python ewts packages
cmaynard-ngwpc Jan 8, 2026
7c7cad1
Use Boost for serializing Multi-BMI
idtodd Feb 6, 2026
0928f65
updates to cicd and dockerfile
miguelp1986 Feb 5, 2026
c7a9da5
updated cicd file
miguelp1986 Feb 11, 2026
84ad631
Merge remote-tracking branch 'NOAA-OWP/master' into development
idtodd Feb 12, 2026
5bc48d4
Align Fortran state size with sizeof int
idtodd Feb 24, 2026
7fdc6d8
Fortran reports size in bytes
idtodd Mar 2, 2026
9994c74
feat(ngen): add mass balance check for all bmi modules during runtime
hellkite500 Sep 17, 2025
28047e2
Revert changes from OWP
idtodd Feb 25, 2026
9a9920a
Use new nwm-ewts libraries and python package
cmaynard-ngwpc Mar 10, 2026
28d992a
EWST function name change
idtodd Mar 26, 2026
cb44c87
Fix rebase problems
idtodd Mar 26, 2026
07e989f
Ensure realization catchment IDs start with "cat-" when searching the…
idtodd Apr 2, 2026
27f7fbe
Add logic and structures for parsing state saving configuration from …
PhilMiller Dec 9, 2025
a542066
State saving for multi-BMI
idtodd Jan 16, 2026
105cddf
Cold start loading
idtodd Jan 20, 2026
8524e15
Use Boost for serializing Multi-BMI
idtodd Feb 6, 2026
2b679c2
updates to cicd and dockerfile
miguelp1986 Feb 5, 2026
66ed20b
updated cicd file
miguelp1986 Feb 11, 2026
41c9aaf
Merge remote-tracking branch 'NOAA-OWP/master' into development
idtodd Feb 12, 2026
6511d0f
Add topoflow-glacier submodule
jswade-rtx Feb 16, 2026
190fb59
Revert changes from OWP
idtodd Feb 25, 2026
1494675
Use new nwm-ewts libraries and python package
cmaynard-ngwpc Mar 10, 2026
f25f1a5
Use Boost for serializing Multi-BMI
idtodd Feb 6, 2026
0e2648f
Fortran state hackery
idtodd Feb 17, 2026
0d68951
Merge remote-tracking branch 'NOAA-OWP/master' into development
idtodd Feb 12, 2026
1c63226
Revert changes from OWP
idtodd Feb 25, 2026
b4a1223
Fix rebase problems
idtodd Mar 26, 2026
9921aa2
Remove duplicate function declaration
idtodd Apr 6, 2026
614dddb
Ignore sentinels made up by partitionGenerator
idtodd Apr 7, 2026
2c7eb80
Fix whereclause builder when sentinels are included
idtodd Apr 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ target_link_libraries(ngen
NGen::parallel
NGen::state_save_restore
NGen::bmi_protocols
NGen::state_save_restore
)

if(NGEN_WITH_SQLITE)
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ ARG ORG=ngwpc
ARG NGEN_FORCING_IMAGE_TAG=latest
ARG NGEN_FORCING_IMAGE=ghcr.io/${ORG}/ngen-bmi-forcing:${NGEN_FORCING_IMAGE_TAG}

FROM ${NGEN_FORCING_IMAGE} AS base
#FROM ${NGEN_FORCING_IMAGE} AS base

# Uncomment when building locally
#FROM ngen-bmi-forcing AS base
FROM ngen-bmi-forcing AS base

# OCI Metadata Arguments
ARG NGEN_FORCING_IMAGE
Expand Down Expand Up @@ -471,6 +471,11 @@ RUN --mount=type=cache,target=/root/.cache/pip,id=pip-cache \
cd extern/topoflow-glacier; \
pip install .

RUN --mount=type=cache,target=/root/.cache/pip,id=pip-cache \
set -eux; \
cd extern/topoflow-glacier; \
pip install .

RUN set -eux && \
mkdir --parents /ngencerf/data/ngen-run-logs/ && \
mkdir --parents /ngen-app/bin/ && \
Expand Down
2 changes: 1 addition & 1 deletion extern/t-route
Submodule t-route updated 2262 files
1 change: 0 additions & 1 deletion include/core/nexus/HY_PointHydroNexusRemote.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class HY_PointHydroNexusRemote : public HY_PointHydroNexus
communication_type get_communicator_type() { return type; }

private:
void post_receives();
void process_communications();

int world_rank;
Expand Down
7 changes: 0 additions & 7 deletions include/realizations/catchment/Bmi_Module_Formulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include "Bmi_Adapter.hpp"
#include <DataProvider.hpp>
#include "bmi_utilities.hpp"

#include <boost/core/span.hpp>
#include "bmi/protocols.hpp"

using data_access::MEAN;
Expand Down Expand Up @@ -59,11 +57,6 @@ namespace realization {

/**
* Get the collection of forcing output property names this instance can provide.
*
* This is part of the @ref ForcingProvider interface. This interface must be implemented for items of this
* type to be usable as "forcing" providers for situations when some other object needs to receive as an input
* (i.e., one of its forcings) a data property output from this object.
*
* For this type, this is the collection of BMI output variables, plus any aliases included in the formulation
* config's output variable mapping.
*
Expand Down
2 changes: 1 addition & 1 deletion include/realizations/catchment/Bmi_Multi_Formulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ namespace realization {

// Since this is a nested formulation, support usage of the '{{id}}' syntax for init config file paths.
Catchment_Formulation::config_pattern_substitution(properties, BMI_REALIZATION_CFG_PARAM_REQ__INIT_CONFIG,
"{{id}}", id);
"{{id}}", Catchment_Formulation::config_pattern_id_replacement(id));

// Call create_formulation to perform the rest of the typical initialization steps for the formulation.
mod->create_formulation(properties);
Expand Down
6 changes: 6 additions & 0 deletions include/realizations/catchment/Catchment_Formulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ namespace realization {
static void config_pattern_substitution(geojson::PropertyMap &properties, const std::string &key,
const std::string &pattern, const std::string &replacement);

/**Remove leading non-numeric characters from the ID string.
*
* This may be needed to correct NGEN adding an identifying prefix to the ID with system file names without the prefix.
*/
static std::string config_pattern_id_replacement(const std::string &id);

/**
* Get a header line appropriate for a file made up of entries from this type's implementation of
* ``get_output_line_for_timestep``.
Expand Down
17 changes: 12 additions & 5 deletions include/realizations/catchment/Formulation_Manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,18 @@ namespace realization {
for (std::pair<std::string, boost::property_tree::ptree> catchment_config : *possible_catchment_configs) {
ss.str(""); ss << "Processing catchment: " << catchment_config.first << std::endl;
LOG(ss.str(), LogLevel::DEBUG);
// ensure catchment's ID starts with "cat-" so it can be found in the fabric
std::string catchment_id = catchment_config.first;
if (strncmp(catchment_id.c_str(), "cat-", 4) != 0) {
catchment_id = "cat-" + catchment_id;
}

int catchment_index = fabric->find(catchment_config.first);
int catchment_index = fabric->find(catchment_id);
if (catchment_index == -1) {
#ifndef NGEN_QUIET
ss.str("");
ss << "Formulation_Manager::read: Cannot create formulation for catchment "
<< catchment_config.first
<< catchment_id
<< " that isn't identified in the hydrofabric or requested subset" << std::endl;
LOG(ss.str(), LogLevel::WARNING);
#endif
Expand All @@ -200,7 +205,7 @@ namespace realization {
this->add_formulation(
this->construct_formulation_from_config(
simulation_time_config,
catchment_config.first,
catchment_id,
catchment_formulation,
output_stream
)
Expand Down Expand Up @@ -553,7 +558,7 @@ namespace realization {
global_copy.formulation.parameters,
BMI_REALIZATION_CFG_PARAM_REQ__INIT_CONFIG,
"{{id}}",
identifier
Catchment_Formulation::config_pattern_id_replacement(identifier)
);
} else {
ss.str(""); ss << "init_config is present but empty for identifier: " << identifier << std::endl;
Expand Down Expand Up @@ -665,7 +670,9 @@ namespace realization {

// Replace {{id}} if present
if (id_index != std::string::npos) {
filepattern = filepattern.replace(id_index, sizeof("{{id}}") - 1, identifier);
// account generate the regex to search for the ID with or without a prefix
std::string pattern_id = Catchment_Formulation::config_pattern_id_replacement(identifier);
filepattern = filepattern.replace(id_index, sizeof("{{id}}") - 1, pattern_id);
}

// Compile the file pattern as a regex
Expand Down
10 changes: 6 additions & 4 deletions src/NGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,12 @@ int run_ngen(int argc, char* argv[], int mpi_num_procs, int mpi_rank) {
#if NGEN_WITH_SQLITE3
try {
nexus_collection = ngen::geopackage::read(nexusDataFile, "nexus", nexus_subset_ids);
} catch (...) {
} catch (std::exception &e) {
// Handle all exceptions
std::string msg = "Geopackage error occurred reading nexuses: " + nexusDataFile;
LOG(msg,LogLevel::FATAL);
throw std::runtime_error(msg);
LOG(LogLevel::FATAL, e.what());
throw;
}
#else
LOG(LogLevel::FATAL, "SQLite3 support required to read GeoPackage files.");
Expand Down Expand Up @@ -480,11 +481,12 @@ int run_ngen(int argc, char* argv[], int mpi_num_procs, int mpi_rank) {
try {
catchment_collection =
ngen::geopackage::read(catchmentDataFile, "divides", catchment_subset_ids);
} catch (...) {
} catch (std::exception &e) {
// Handle all exceptions
std::string msg = "Geopackage error occurred reading divides: " + catchmentDataFile;
LOG(msg,LogLevel::FATAL);
throw std::runtime_error(msg);
LOG(LogLevel::FATAL, e.what());
throw;
}

#else
Expand Down
Loading
Loading