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
81b7d9f
PR: Adding work from previous PIs into feature branch (#24)
taddyb Aug 19, 2025
23ec477
Ngwpc 6956: Complete the test case and any changes to support USBR re…
taddyb Aug 22, 2025
c640211
Pin package versions in requirements.txt
taddyb Aug 22, 2025
fbaef3c
Owp merge GitHub master edfs troute pi6 (#26)
taddyb Aug 22, 2025
8cbe335
RFC Channel Loss algorithm implementation (#28)
taddyb Aug 25, 2025
fecf6a4
NGWPC 7006: Replace and route updates to the icefabric (#29)
taddyb Aug 30, 2025
326158b
patch: fixed broken lower colorado test (#31)
taddyb Aug 31, 2025
cebc049
NGWPC 7009: prepping t-route rnr for test (#30)
taddyb Sep 2, 2025
4a930cd
NGWPC-6058: added iac entrypoint to troute-rnr (#34)
taddyb Sep 13, 2025
e0ceee2
Patch 091325: typos and logic in postprocessing (#35)
taddyb Sep 15, 2025
69162dd
patch: removed collect (#36)
taddyb Sep 15, 2025
1ea19b4
patch: added bucket_name (#37)
taddyb Sep 15, 2025
19a38df
patch: added logging and IaC channel support (#38)
taddyb Sep 17, 2025
1ae5e76
patch: changed boto3 location for import in main (#39)
taddyb Sep 17, 2025
13323b1
patch: updated boto3 version (#40)
taddyb Sep 18, 2025
33a6ac4
Patch 091725 update boto3 version (#41)
taddyb Sep 18, 2025
19fbb92
patch: updated iac channel rabbit_mq_endpoint reference
kevinspurrier Sep 18, 2025
72437b4
patch: changed mkdir to create parents, added a store_true to --iac p…
taddyb Sep 18, 2025
05be027
patch: added numpy <2 dependency
taddyb Sep 18, 2025
a093887
patch: changed mkdir to create parents
kevinspurrier Sep 18, 2025
cc1d11e
feat: added debug logging
taddyb Sep 19, 2025
0ad742b
Patc: added debug flag to make log level optional
taddyb Sep 19, 2025
a57d10e
fix: updated incorrect file reference
taddyb Sep 19, 2025
2dbc17a
fix: removed data dir references
taddyb Sep 19, 2025
bfe553d
fix: removed xarray s3 writes (#42)
taddyb Sep 19, 2025
3fad399
merge: merging in rfc-channel loss
taddyb Nov 24, 2025
6d9d61b
merge: merged channel loss into developement
taddyb Nov 24, 2025
009ab2f
merge: merging usbr persistence
taddyb Nov 24, 2025
c35f79e
merge: merging in rnr
taddyb Nov 24, 2025
80c8065
merge: merging development
taddyb Nov 24, 2025
d0bdd34
tests: added test case for conecuh river test case (#57)
taddyb Nov 25, 2025
a9bf1aa
Merge remote-tracking branch 'origin/nhf-routing' into idt-merge-edfs…
idtodd Feb 23, 2026
45b09b8
Create results wrapper around raw tuple results
idtodd Feb 23, 2026
26db479
Add new arguments to nwm_route call
idtodd Feb 23, 2026
90fa704
Add ET values messaging and building
idtodd Feb 23, 2026
6028ff1
Fix ngen dt calculation
idtodd Feb 24, 2026
0bf8cfb
Ability to resize variables with set_value
idtodd Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,19 @@ bower_components/
src/vendor/
dist/

# Build dirs #
##############
build/

# .vscode files #
#################
.vscode/

# UV lock #
###########
uv.lock

# data #
########
data/
output/
143 changes: 87 additions & 56 deletions compiler.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

#TODO add options for clean/noclean, make/nomake, cython/nocython
#TODO include instuctions on blowing away entire package for fresh install e.g. rm -r ~/venvs/mesh/lib/python3.6/site-packages/troute/*

#set root folder of github repo (should be named t-route)
REPOROOT=`pwd`

#For each build step, you can set these to true to make it build
#or set it to anything else (or unset) to skip that step
build_mc_kernel=true
Expand All @@ -18,23 +22,51 @@ then
export F90="gfortran"
echo "using F90=${F90}"
fi

if [ -z "$CC" ]
then
export CC="gcc"
echo "using CC=${CC}"
fi

#preserve old/default behavior of installing packages with -e
# Parse command line arguments
WITH_EDITABLE=true
if [ "$1" == 'no-e' ]
then
WITH_EDITABLE=false
USE_UV=false

while [[ $# -gt 0 ]]; do
case $1 in
no-e)
WITH_EDITABLE=false
shift
;;
--uv)
USE_UV=true
shift
;;
*)
echo "Unknown option: $1"
echo "Usage: $0 [no-e] [--uv]"
echo " no-e: Install packages without editable mode"
echo " --uv: Use uv pip instead of pip"
exit 1
;;
esac
done

# set pip command based on UV flag
if [[ "$USE_UV" == true ]]; then
PIP_CMD="uv pip"
echo "Using uv pip for package installation"
else
PIP_CMD="pip"
echo "Using standard pip for package installation"
fi

#if you have custom static library paths, uncomment below and export them
#export LIBRARY_PATH=<paths>:$LIBRARY_PATH
#if you have custom dynamic library paths, uncomment below and export them
#export LD_LIBRARY_PATHS=<paths>:$LD_LIBRARY_PATHS

if [ -z "$NETCDF" ]
then
export NETCDFINC=/usr/include/openmpi-x86_64/
Expand All @@ -45,8 +77,8 @@ then
# (before ./compiler.sh)
if [ -n "$NETCDFALTERNATIVE" ]
then
echo "using alternative NETCDF inc ${NETCDFALTERNATIVE}"
export NETCDFINC=$NETCDFALTERNATIVE
echo "using alternative NETCDF inc ${NETCDFALTERNATIVE}"
export NETCDFINC=$NETCDFALTERNATIVE
fi
else
export NETCDFINC="${NETCDF}"
Expand All @@ -62,27 +94,26 @@ if [[ "$build_mc_kernel" == true ]]; then
make install || exit
fi

if [[ "$build_diffusive_tulane_kernel" == true ]]; then
#building reach and resevoir kernel files .o
cd $REPOROOT/src/kernel/diffusive/
make clean
make diffusive.o
make pydiffusive.o
make chxsec_lookuptable.o
make pychxsec_lookuptable.o
make install || exit
if [[ "$build_diffusive_tulane_kernel" == true ]]; then
#building reach and resevoir kernel files .o
cd $REPOROOT/src/kernel/diffusive/
make clean
make diffusive.o
make pydiffusive.o
make chxsec_lookuptable.o
make pychxsec_lookuptable.o
make install || exit
fi

if [[ "$build_reservoir_kernel" == true ]]; then
cd $REPOROOT/src/kernel/reservoir/
make clean
#make NETCDFINC=`nc-config --includedir` || exit
#make binding_lp.a
#make install_lp || exit
make
make install_lp || exit
make install_rfc || exit

cd $REPOROOT/src/kernel/reservoir/
make clean
#make NETCDFINC=`nc-config --includedir` || exit
#make binding_lp.a
#make install_lp || exit
make
make install_lp || exit
make install_rfc || exit
fi

cd $REPOROOT/src/troute_ewts
Expand All @@ -93,47 +124,47 @@ else
fi

if [[ "$build_framework" == true ]]; then
#creates troute package
cd $REPOROOT/src/troute-network
rm -rf build

if [[ ${WITH_EDITABLE} == true ]]; then
pip install --no-build-isolation --config-setting='--build-option=--use-cython' --editable . --config-setting='editable_mode=compat' || exit
else
pip install --no-build-isolation --config-setting='--build-option=--use-cython' . || exit
fi
#creates troute package
cd $REPOROOT/src/troute-network
rm -rf build
if [[ ${WITH_EDITABLE} == true ]]; then
$PIP_CMD install --no-build-isolation --config-setting='--build-option=--use-cython' --editable . --config-setting='editable_mode=compat' || exit
else
$PIP_CMD install --no-build-isolation --config-setting='--build-option=--use-cython' . || exit
fi
fi

if [[ "$build_routing" == true ]]; then
#updates troute package with the execution script
cd $REPOROOT/src/troute-routing
rm -rf build

if [[ ${WITH_EDITABLE} == true ]]; then
pip install --no-build-isolation --config-setting='--build-option=--use-cython' --editable . --config-setting='editable_mode=compat' || exit
else
pip install --no-build-isolation --config-setting='--build-option=--use-cython' . || exit
fi
#updates troute package with the execution script
cd $REPOROOT/src/troute-routing
rm -rf build
if [[ ${WITH_EDITABLE} == true ]]; then
$PIP_CMD install --no-build-isolation --config-setting='--build-option=--use-cython' --editable . --config-setting='editable_mode=compat' || exit
else
$PIP_CMD install --no-build-isolation --config-setting='--build-option=--use-cython' . || exit
fi
fi

if [[ "$build_config" == true ]]; then
#updates troute package with the execution script
cd $REPOROOT/src/troute-config
if [[ ${WITH_EDITABLE} == true ]]; then
pip install --editable . || exit
else
pip install . || exit
fi
#updates troute package with the execution script
cd $REPOROOT/src/troute-config
if [[ ${WITH_EDITABLE} == true ]]; then
$PIP_CMD install --editable . || exit
else
$PIP_CMD install . || exit
fi
fi

if [[ "$build_nwm" == true ]]; then
#updates troute package with the execution script
cd $REPOROOT/src/troute-nwm
if [[ ${WITH_EDITABLE} == true ]]; then
pip install --editable . || exit
else
pip install . || exit
fi
#updates troute package with the execution script
cd $REPOROOT/src/troute-nwm
if [[ ${WITH_EDITABLE} == true ]]; then
$PIP_CMD install --editable . || exit
else
$PIP_CMD install . || exit
fi
fi

if [[ "$build_bmi" == true ]]; then
Expand Down
128 changes: 0 additions & 128 deletions compiler_uv.sh

This file was deleted.

9 changes: 9 additions & 0 deletions src/model_DAforcing.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def __init__(self, bmi_cfg_file=None):

usgs_persistence = data_assimilation_parameters.get('reservoir_da', {}).get('reservoir_persistence_da', {}).get('reservoir_persistence_usgs', False)
usace_persistence = data_assimilation_parameters.get('reservoir_da', {}).get('reservoir_persistence_da', {}).get('reservoir_persistence_usace', False)
usbr_persistence = data_assimilation_parameters.get('reservoir_da', {}).get('reservoir_persistence_da', {}).get('reservoir_persistence_usbr', False)
rfc = data_assimilation_parameters.get('reservoir_da', {}).get('reservoir_rfc_da', {}).get('reservoir_rfc_forecasts', False)

qc_threshold = data_assimilation_parameters.get('qc_threshold')
Expand Down Expand Up @@ -135,6 +136,14 @@ def __init__(self, bmi_cfg_file=None):
qc_threshold,
900, #15 minutes
cpu_pool,)

if usbr_persistence:
usace_timeslice_path = str(data_assimilation_parameters.get('usbr_timeslices_folder'))
self._reservoir_usace_df = _read_timeslice_files(usace_timeslice_path,
timeslice_dates,
qc_threshold,
900, #15 minutes
cpu_pool,)

# Produce list of datetimes to search for timeseries files
rfc_parameters = data_assimilation_parameters.get('reservoir_da', {}).get('reservoir_rfc_da', {})
Expand Down
Loading