Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
edd3f56
Map NHF hydrofabric to old field names
idtodd Mar 11, 2026
b04007e
Improved messaging for geopackage error handling
idtodd Mar 12, 2026
f1d9bca
Account for realization config json not including feature type prefix
idtodd Mar 18, 2026
c56c235
Change IIF to CASE for sqlite 3.26 support
idtodd Mar 25, 2026
eceb4f5
Restore support for older-format NetCDF forcings files that have Time…
PhilMiller Dec 26, 2025
e48284f
Clean up comments and formatting
PhilMiller Dec 26, 2025
6130bef
Handle more units, with and without a specified reference epoch
PhilMiller Dec 26, 2025
6e7bf29
Handle different orderings of variable dimensions
PhilMiller Dec 26, 2025
7871dcd
Flesh out API for state saving and restoring, with adjusted use in Bm…
PhilMiller Nov 25, 2025
9bb5c3b
WIP Wiring all the pieces together
PhilMiller Nov 26, 2025
170e9c7
Add logic and structures for parsing state saving configuration from …
PhilMiller Dec 9, 2025
dd0458d
CMakeLists.txt: Remove commented out bits
PhilMiller Dec 10, 2025
58331e9
Add File_Per_Unit state saving mechanism
PhilMiller Dec 16, 2025
53b3767
State saving for multi-BMI
idtodd Jan 16, 2026
ca919a3
Cold start config structure
idtodd Jan 19, 2026
c9b17bb
Cold start loading
idtodd Jan 20, 2026
35f906b
Fix config JSON array parsing
idtodd Jan 20, 2026
cea2914
Less restrictive start and end of run save state
idtodd Jan 21, 2026
fefc8cf
Use parent classes for start and end of run states
idtodd Jan 21, 2026
bfcccf8
Dynamically sized set value option for python BMI adapter
idtodd Jan 27, 2026
ea924cc
Add output suppression flag for UEB
idtodd Jan 30, 2026
ddce21c
Docker updates for python ewts packages
cmaynard-ngwpc Jan 8, 2026
88f864c
Ensure bmi_model has not been destroyed
idtodd Dec 8, 2025
5946073
Remove null check since that should be an error state if null
idtodd Dec 11, 2025
903d204
Revert "Release BMI reference"
cmaynard-ngwpc Jan 21, 2026
686ded9
Revert "Finalize forcing engine providers on instances clear"
cmaynard-ngwpc Jan 21, 2026
cca2b9c
Revert "Remove null check since that should be an error state if null"
cmaynard-ngwpc Jan 21, 2026
576a816
Revert "Ensure bmi_model has not been destroyed"
cmaynard-ngwpc Jan 21, 2026
b8d830e
Revert "Remove explicit interpreter release"
cmaynard-ngwpc Jan 21, 2026
9663faa
Revert "Fix use-after-free error"
cmaynard-ngwpc Jan 21, 2026
f61741e
Fix use-after-free error
idtodd Dec 8, 2025
5db69e2
Remove explicit interpreter release
idtodd Dec 8, 2025
5fe6283
Ensure bmi_model has not been destroyed
idtodd Dec 8, 2025
fcbb904
Remove null check since that should be an error state if null
idtodd Dec 11, 2025
b9a4411
Finalize forcing engine providers on instances clear
idtodd Dec 19, 2025
f39f849
Release BMI reference
idtodd Dec 22, 2025
572d770
Catch csv file errors and log exceptions initializing formulation
cmaynard-ngwpc Dec 4, 2025
585620f
Add check for empty CSV forcing file.
cmaynard-ngwpc Dec 4, 2025
f96e983
Ensure bmi_model has not been destroyed
idtodd Dec 8, 2025
3ede569
Remove null check since that should be an error state if null
idtodd Dec 11, 2025
61f96d3
Ensure data ownership not passed to python
idtodd Jan 30, 2026
1663411
T-Route save stating for hot start
idtodd Feb 4, 2026
8c50295
Global source for serialization message names
idtodd Feb 4, 2026
79d4599
Expand applicable types for get value as double
idtodd Feb 4, 2026
0d5f27f
C++14 consts
idtodd Feb 4, 2026
d862fa4
Expand python typing interface
idtodd Feb 5, 2026
c86130b
Prevent multiple hot start config definitions
idtodd Feb 5, 2026
4314da8
Use Boost for serializing Multi-BMI
idtodd Feb 6, 2026
1f67c18
Add GetValuePtrInt for Fortran Adapter
idtodd Feb 12, 2026
88fd9a2
Fortran state hackery
idtodd Feb 17, 2026
34fa266
Add variable name
idtodd Feb 17, 2026
1d7f39c
Update submodules for testing
idtodd Feb 18, 2026
761622f
updates to cicd and dockerfile
miguelp1986 Feb 5, 2026
695d05f
updated cicd file
miguelp1986 Feb 5, 2026
5555cf3
updated cicd file
miguelp1986 Feb 11, 2026
b76ddfa
Merge remote-tracking branch 'NOAA-OWP/master' into development
idtodd Feb 12, 2026
b608121
Flesh out API for state saving and restoring, with adjusted use in Bm…
PhilMiller Nov 25, 2025
87ae513
Add logic and structures for parsing state saving configuration from …
PhilMiller Dec 9, 2025
97be208
State saving for multi-BMI
idtodd Jan 16, 2026
0bd330c
Use Boost for serializing Multi-BMI
idtodd Feb 6, 2026
373ea10
Remove old state calls
idtodd Feb 18, 2026
d90e9ab
Remove old state saving definitions
idtodd Feb 18, 2026
f12fde0
Align Fortran state size with sizeof int
idtodd Feb 24, 2026
f70d1f1
Dynamically check Fortran state size for load alignment
idtodd Feb 26, 2026
403c39a
Fortran reports size in bytes
idtodd Mar 2, 2026
606f4cc
Merge remote-tracking branch 'NOAA-OWP/master' into development
idtodd Feb 12, 2026
01db1cd
feat(mass_balance): define the bmi mass balance protocol
hellkite500 Sep 16, 2025
faa2a6e
test(bmi_protocols): add mock for BMI protocol testing
hellkite500 Sep 16, 2025
76cf05d
feat(ngen): add mass balance check for all bmi modules during runtime
hellkite500 Sep 17, 2025
54b2fc9
feat(bmi-protocols)!: v0.2 of the protocols lib using expected semant…
hellkite500 Sep 27, 2025
7f9490b
fix(protocols): better default handling; add missing return
hellkite500 Oct 23, 2025
17c3c96
test: point formulation tests to use same protocol mock
hellkite500 Oct 23, 2025
8a70e0e
fix(mpi): prevent potential deadlock scenario
hellkite500 Feb 4, 2026
3f70965
fix(mpi): better handling of pending communication in remote nexus de…
hellkite500 Feb 4, 2026
31bdae9
Merge resolution from OWP Master
idtodd Feb 20, 2026
4beddb4
Revert changes from OWP
idtodd Feb 25, 2026
5c52f20
updated cicd file
miguelp1986 Mar 4, 2026
8723b6f
Flesh out API for state saving and restoring, with adjusted use in Bm…
PhilMiller Nov 25, 2025
0092858
State saving for multi-BMI
idtodd Jan 16, 2026
a91227d
Cold start loading
idtodd Jan 20, 2026
2b8404b
Use Boost for serializing Multi-BMI
idtodd Feb 6, 2026
c1f56ad
Merge remote-tracking branch 'NOAA-OWP/master' into development
idtodd Feb 12, 2026
fad4e55
Align Fortran state size with sizeof int
idtodd Feb 24, 2026
832ddd4
Fortran reports size in bytes
idtodd Mar 2, 2026
4f75a38
Fix rebase problems
idtodd Mar 10, 2026
c7061b3
Remove commented old code
idtodd Mar 10, 2026
bbe2731
Log end of run saving
idtodd Mar 10, 2026
caef072
Fix documentation
idtodd Mar 10, 2026
0830c2c
Send NGEN's delta time to T-route
idtodd Mar 13, 2026
a082fd8
Update setup-trivy action to v0.2.6
cnealen Mar 23, 2026
f2635d0
Use new nwm-ewts libraries and python package
cmaynard-ngwpc Mar 10, 2026
5db2463
updated Dockerfile to include EWTS
miguelp1986 Mar 13, 2026
a29731c
Updates to Dockerfile comments for clarification
cmaynard-ngwpc Mar 13, 2026
1fd1758
fixing cloning issue with ewts
miguelp1986 Mar 13, 2026
cffad40
added ewts path to t route build
miguelp1986 Mar 13, 2026
7f834a7
dockerfile updates
miguelp1986 Mar 13, 2026
e28c742
dockerfile updates
miguelp1986 Mar 13, 2026
c7182c2
dockerfile updates
miguelp1986 Mar 13, 2026
9196426
fix: change ewts linkage from PRIVATE to PUBLIC in all CMakeLists
miguelp1986 Mar 13, 2026
a0c8b08
Fix ewts-verify stage to handle lib64 install path
miguelp1986 Mar 13, 2026
83bdfb4
removed ewts verification stage
miguelp1986 Mar 13, 2026
d6024d2
added ewts build arguments to ngwpc cicd file
miguelp1986 Mar 17, 2026
7e55bed
added ewts to ngwpc cicd file in codeql step
miguelp1986 Mar 17, 2026
700c46d
cicd updates
miguelp1986 Mar 17, 2026
b48a387
cicd updates
miguelp1986 Mar 17, 2026
2e6cc9b
Add ewts to ngen state saving.
cmaynard-ngwpc Mar 18, 2026
d18167a
EWST function name change
idtodd Mar 26, 2026
74f3f57
Fix rebase problems
idtodd Mar 26, 2026
79b44e1
Update submodule references
idtodd Mar 26, 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
43 changes: 37 additions & 6 deletions .github/workflows/ngwpc-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ on:
description: 'NGEN_FORCING_IMAGE_TAG'
required: false
type: string
EWTS_ORG:
description: 'EWTS_ORG'
required: false
type: string
EWTS_REF:
description: 'EWTS_REF'
required: false
type: string

permissions:
contents: read
Expand Down Expand Up @@ -149,7 +157,7 @@ jobs:

BOOST_VER=1.86.0
BOOST_UNDERSCORE=1_86_0
PREFIX=/opt/boost-${BOOST_VER}
PREFIX=/usr/local

curl -fL --retry 10 --retry-delay 2 --max-time 600 \
-o /tmp/boost.tar.bz2 \
Expand All @@ -161,7 +169,7 @@ jobs:
./bootstrap.sh --prefix="${PREFIX}"

# Build Boost libraries
./b2 -j"$(nproc)" install \
sudo ./b2 -j"$(nproc)" install \
--with-system \
--with-filesystem \
--with-program_options \
Expand All @@ -170,14 +178,35 @@ jobs:
--with-date_time \
--with-serialization
echo "BOOST_ROOT=${PREFIX}" >> "$GITHUB_ENV"
echo "CMAKE_PREFIX_PATH=${PREFIX}:${CMAKE_PREFIX_PATH:-}" >> "$GITHUB_ENV"

- name: Build and install EWTS
run: |
set -euo pipefail
EWTS_ORG="${{ inputs.EWTS_ORG || 'NGWPC' }}"
EWTS_REF="${{ inputs.EWTS_REF || 'development' }}"
EWTS_PREFIX=/opt/ewts

git clone --depth 1 -b "${EWTS_REF}" \
"https://github.com/${EWTS_ORG}/nwm-ewts.git" /tmp/nwm-ewts \
|| (git clone "https://github.com/${EWTS_ORG}/nwm-ewts.git" /tmp/nwm-ewts && \
cd /tmp/nwm-ewts && git checkout "${EWTS_REF}")

cd /tmp/nwm-ewts
cmake -S . -B cmake_build \
-DCMAKE_BUILD_TYPE=Release \
-DEWTS_WITH_NGEN=ON \
-DEWTS_BUILD_SHARED=ON
cmake --build cmake_build -j "$(nproc)"
sudo cmake --install cmake_build --prefix "${EWTS_PREFIX}"

echo "EWTS_PREFIX=${EWTS_PREFIX}" >> "$GITHUB_ENV"

- name: Build C++ code
env:
PYTHONPATH: ${{ env.PYTHONPATH }}
run: |
cmake -B cmake_build -S . \
-DCMAKE_PREFIX_PATH="${BOOST_ROOT}" \
-DCMAKE_PREFIX_PATH="${EWTS_PREFIX};${BOOST_ROOT}" \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBOOST_ROOT="${BOOST_ROOT}" \
-DPYTHON_EXECUTABLE=$(which python3) \
Expand Down Expand Up @@ -241,6 +270,8 @@ jobs:
build-args: |
ORG=${{ needs.setup.outputs.org }}
NGEN_FORCING_IMAGE_TAG=${{ inputs.NGEN_FORCING_IMAGE_TAG || 'latest' }}
EWTS_ORG=${{ inputs.EWTS_ORG || 'NGWPC' }}
EWTS_REF=${{ inputs.EWTS_REF || 'development' }}
IMAGE_SOURCE=https://github.com/${{ github.repository }}
IMAGE_VENDOR=${{ github.repository_owner }}
IMAGE_VERSION=${{ needs.setup.outputs.clean_ref }}
Expand Down Expand Up @@ -286,10 +317,10 @@ jobs:
- build
steps:
- name: Install Trivy
uses: aquasecurity/setup-trivy@v0.2.2
uses: aquasecurity/setup-trivy@v0.2.6
with:
cache: true
version: v0.68.2
version: v0.69.3

- name: Trivy scan
env:
Expand Down
45 changes: 42 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# ngen/CMakeLists.txt
#

# Ensure CMake policies have defaults depending on the CMake version used
# between the two versions specified. e.g. if 3.18 is used, then 3.18 defaults
# will be used instead of 3.17 defaults.
Expand Down Expand Up @@ -118,6 +122,30 @@ project(ngen VERSION 0.3.0)

add_executable(ngen "${NGEN_SRC_DIR}/NGen.cpp")

# --- EWTS (installed from nwm-ewts) ---
find_package(ewts CONFIG REQUIRED)

if(DEFINED ewts_VERSION AND NOT "${ewts_VERSION}" STREQUAL "")
set(NGEN_EWTS_VERSION "${ewts_VERSION}")
else()
set(NGEN_EWTS_VERSION "<unknown>")
endif()

if(DEFINED EWTS_NGWPC_VERSION AND NOT "${EWTS_NGWPC_VERSION}" STREQUAL "")
set(NGEN_EWTS_NGWPC_VERSION "${EWTS_NGWPC_VERSION}")
else()
set(NGEN_EWTS_NGWPC_VERSION "<unknown>")
endif()

get_filename_component(EWTS_PREFIX "${ewts_DIR}" DIRECTORY)
get_filename_component(EWTS_PREFIX "${EWTS_PREFIX}" DIRECTORY)
get_filename_component(EWTS_PREFIX "${EWTS_PREFIX}" DIRECTORY)

message(STATUS "Found EWTS: ${EWTS_PREFIX} (found version ${ewts_VERSION})")

# NGen itself uses the NGen-specific EWTS logger/bridge
target_link_libraries(ngen PRIVATE ewts::ewts_ngen_bridge)

# Dependencies ================================================================

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -165,7 +193,12 @@ add_compile_definitions(NGEN_SHARED_LIB_EXTENSION)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.86.0 REQUIRED)
if(CMAKE_CXX_STANDARD LESS 17)
# requires non-header filesystem for state saving if C++ 11 or lower
find_package(Boost 1.86.0 REQUIRED COMPONENTS system filesystem)
else()
find_package(Boost 1.86.0 REQUIRED)
endif()

# -----------------------------------------------------------------------------
if(NGEN_WITH_SQLITE)
Expand Down Expand Up @@ -281,7 +314,6 @@ if(UDUNITS_QUIET)
add_compile_definitions(UDUNITS_QUIET)
endif()


# -----------------------------------------------------------------------------
# Project Targets
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -318,6 +350,7 @@ add_subdirectory("src/geojson")
add_subdirectory("src/bmi")
add_subdirectory("src/realizations/catchment")
add_subdirectory("src/forcing")
add_subdirectory("src/state_save_restore")
add_subdirectory("src/utilities")
add_subdirectory("src/utilities/mdarray")
add_subdirectory("src/utilities/mdframe")
Expand All @@ -337,7 +370,9 @@ target_link_libraries(ngen
NGen::core_mediator
NGen::logging
NGen::parallel
NGen::state_save_restore
NGen::bmi_protocols
NGen::state_save_restore
)

if(NGEN_WITH_SQLITE)
Expand All @@ -351,6 +386,7 @@ if(NGEN_WITH_ROUTING)
endif()

add_executable(partitionGenerator src/partitionGenerator.cpp)
target_link_libraries(partitionGenerator PRIVATE ewts::ewts_ngen_bridge)
target_link_libraries(partitionGenerator PUBLIC NGen::logging)
target_include_directories(partitionGenerator PUBLIC "${PROJECT_BINARY_DIR}/include")
if(NGEN_WITH_SQLITE)
Expand Down Expand Up @@ -441,7 +477,10 @@ ngen_multiline_message(
" Boost:"
" Version: ${Boost_VERSION}"
" Include: ${Boost_INCLUDE_DIRS}"
" Library: ${Boost_LIBRARY_DIRS}")
" Library: ${Boost_LIBRARY_DIRS}"
" EWTS:"
" Package Version: ${NGEN_EWTS_VERSION}"
" NGWPC Version: ${NGEN_EWTS_NGWPC_VERSION}")
ngen_dependent_multiline_message(INTEL_DPCPP
" Intel DPC++:"
" Version: ${SYCL_LANGUAGE_VERSION}"
Expand Down
Loading