Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3c52323
Changing the position of thalweg, longitudinal and nonmonotonic adjus…
hhs732 Aug 6, 2025
c976392
Changing the position of thalweg, longitudinal and nonmonotonic adjus…
hhs732 Aug 6, 2025
99bc905
Replacing min filter with 10 percentile and updating the parameters
hhs732 Aug 27, 2025
7901483
Replacing min filter with 10 percentile and updating the parameters
hhs732 Aug 27, 2025
fcf7849
Replacing min filter with 10 percentile and updating the parameters
hhs732 Aug 27, 2025
b35de82
Replacing min filter with 10 percentile and updating the parameters
hhs732 Aug 27, 2025
1d4a0e8
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 11, 2025
04ccab2
Merge branch 'dev' of https://github.com/NOAA-OWP/inundation-mapping …
hhs732 Sep 11, 2025
7c42086
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 11, 2025
24d2108
Updating Persistent Discharge Columns to SRC Tables after each Post-p…
hhs732 Sep 16, 2025
f06323d
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 17, 2025
4a0c386
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 17, 2025
fbc2f2f
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 17, 2025
a4bcba8
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 17, 2025
831c5cf
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 17, 2025
f1fea86
Adding Persistent Discharge Columns to SRC Tables after each Post-pro…
hhs732 Sep 17, 2025
86dac7a
Changed Sigma value in longitudinal filtering
hhs732 Oct 8, 2025
39e21b1
Changed Sigma value in longitudinal filtering and linting
hhs732 Oct 8, 2025
24b44c9
Merge branch 'dev' of https://github.com/NOAA-OWP/inundation-mapping …
hhs732 Oct 8, 2025
885ff5b
Changed Sigma value in longitudinal filtering and merged with dev
hhs732 Oct 8, 2025
77dbbd0
Merge branch 'dev' of https://github.com/NOAA-OWP/inundation-mapping …
Oct 10, 2025
f21082b
merge dev and changelog
Oct 10, 2025
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
9 changes: 6 additions & 3 deletions config/params_template.env
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export levee_id_attribute=SYSTEM_ID
# Removes Hydro-conditioning Artifacts (true=on; false=off)
export healed_hand_hydrocondition=true

#### apply thalweg notches adjustment to rating curve ####
export thalweg_notches_adjustment=True

#### apply longitudinal filter to rating curve ####
export logitudinal_filter=True

#### apply bathymetry adjustment to rating curve ####
export bathymetry_adjust=True
export ai_toggle=1
Expand All @@ -55,9 +61,6 @@ export vrough_suffix=""
#### apply nonmonotonic src adjustment to rating curve ####
export nonmonotonic_src_adjustment=True

#### apply longitudinal filter to rating curve ####
export logitudinal_filter=True

#### SRC calibration variables
#### apply SRC adjustments using USGS rating curve database ####
# Toggle to run src adjustment routine with USGS rating data (True=on; False=off)
Expand Down
21 changes: 18 additions & 3 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
All notable changes to this project will be documented in this file.
We follow the [Semantic Versioning 2.0.0](http://semver.org/) format.

## v4.8.12.0 - 2025-10-10 - [PR#1621]([https://github.com/NOAA-OWP/inundation-mapping/pull/1621])

This PR focuses on the position of three scripts in the post-processing and updating the longitudinal filtering parameters. First, a new script has been written to address the thalweg notch adjustment, separated from the nonmonotonic adjustment script. Second, the post-processing has been changed in a way that `thalweg_notches_adjustment` and `logitudinal_flow_adjustment` will be run before `bathymetry_adjustment`. Then, `nonmonotonic_adjustment` will be run after the `src_subdivision` section. The second purpose of this PR is to update the `longitudinal_adjustment` parameters and replace the minimum filter with the lowest 10-percentile of the discharge on the rating curve.

### Additions
- `src/`
- `thalweg_notches_adjustment.py`

### Changes
- `fim_post_processing.sh`
- `src/`
- `longitudinal_flow_adjustment.py`
- `nonmonotonic_src_adjustment.py`
- `config/`
- `params_template.env`
<br/>

## v4.8.11.3 - 2025-10-10 - [PR#1669](https://github.com/NOAA-OWP/inundation-mapping/pull/1669)

The FEMA NFHL data consists of several layers. The 100- and 500-year floodplain layers are merged into a layer called 'combined'. However, if a HUC has neither 100- or 500-year floodplain layers, the `combined` layer is not produced. This missing `combined` layer causes an error in `src/adjust_floodplains.py`. This patch skips the reading of the `combined` layer if it doesn't exist.
Expand Down Expand Up @@ -402,9 +419,7 @@ Removing the hydrofabric slope values for now due to issues with erroneous value
<br/><br/>


## v4.8.6.3 - 2025-07-14 - [PR#1574](https://github.com/NOAA-OWP/inundation-mapping/pull/1574)

## v4.8.x.x - 2025-07-15 - [PR#1595](https://github.com/NOAA-OWP/inundation-mapping/pull/1595)
## v4.8.6.3 - 2025-07-15 - [PR#1595](https://github.com/NOAA-OWP/inundation-mapping/pull/1595)

Clips NWM streams at the land/sea mask.

Expand Down
33 changes: 22 additions & 11 deletions fim_post_processing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,28 @@ Tstart
python3 $srcDir/aggregate_by_huc.py -fim $outputDestDir -i $fim_inputs -elev -ras -j $jobLimit
Tcount

## RUN THALWEG NOTCHES ADJUSTMENT ROUTINE ##
if [ "$thalweg_notches_adjustment" = "True" ]; then
l_echo $startDiv"Performing thalweg notches adjustment routine"
Tstart
python3 $srcDir/thalweg_notches_adjustment.py \
-fim_dir $outputDestDir \
-j $jobLimit \

Tcount
fi

## RUN LONGITUDINAL FILTER ROUTINE ##
if [ "$logitudinal_filter" = "True" ]; then
l_echo $startDiv"Performing longitudinal discharge adjustment routine"
Tstart
python3 $srcDir/longitudinal_flow_adjustment.py \
-fim_dir $outputDestDir \
-j $jobLimit \

Tcount
fi

## RUN BATHYMETRY ADJUSTMENT ROUTINE ##
if [ "$bathymetry_adjust" = "True" ]; then
l_echo $startDiv"Performing Bathymetry Adjustment routine"
Expand Down Expand Up @@ -222,17 +244,6 @@ if [ "$nonmonotonic_src_adjustment" = "True" ]; then
Tcount
fi

## RUN LONGITUDINAL FILTER ROUTINE ##
if [ "$logitudinal_filter" = "True" ]; then
l_echo $startDiv"Performing longitudinal discharge adjustment routine"
Tstart
python3 $srcDir/longitudinal_flow_adjustment.py \
-fim_dir $outputDestDir \
-j $jobLimit \

Tcount
fi

## RUN SYNTHETIC RATING CURVE CALIBRATION W/ USGS GAGE RATING CURVES ##
if [ "$src_adjust_usgs" = "True" ] && [ "$src_subdiv_toggle" = "True" ] && [ "$skipcal" = "0" ]; then
Tstart
Expand Down
2 changes: 1 addition & 1 deletion src/bash_variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export input_fema_flood_hazard_zones=${inputsDir}/fema/nfhl/20250708
export input_calib_points_dir=${inputsDir}/rating_curve/water_edge_database/calibration_points_20250103/
export bathy_file_ehydro=${inputsDir}/bathymetry/final_bathymetry_ehydro_ohrfc.gpkg
export bathy_file_aibased=${inputsDir}/bathymetry/ml_auxiliary_data.parquet
export mannN_file_aibased=${inputsDir}/bathymetry/ml_outputs_v1.01.parquet
export mannN_file_aibased=${inputsDir}/bathymetry/ml_auxiliary_data.parquet
export iris_sword_slope=${inputsDir}/rating_curve/reach_slope/IRIS_SWORD_v1.0.parquet
export nws_lid=${inputsDir}/ahps_sites/nws_lid.gpkg

Expand Down
16 changes: 15 additions & 1 deletion src/bathymetric_adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ def correct_rating_for_ehydro_bathymetry(fim_dir, huc, bathy_file_ehydro, verbos
src_df.loc[cond_q, 'WetArea (m2)'] = 0
src_df.loc[cond_q, 'HydraulicRadius (m)'] = 0

src_df2 = src_df.copy()
discharge_bathymetry = src_df2['Discharge (m3s-1)']
src_df['Discharge (m3s-1)_bathymetryAdjusted'] = discharge_bathymetry

# Write src back to file
# src_df = src_df.drop_duplicates(subset=['HydroID', 'Stage'], keep='first').reset_index(drop=True)
src_df.to_csv(src, index=False)
Expand Down Expand Up @@ -294,6 +298,11 @@ def correct_rating_for_ai_bathymetry(fim_dir, huc, strm_order, bathy_file_aibase

# Write src back to file
src_df = src_df.drop_duplicates(subset=['HydroID', 'Stage'], keep='first').reset_index(drop=True)

src_df2 = src_df.copy()
discharge_bathymetry = src_df2['Discharge (m3s-1)']
src_df['Discharge (m3s-1)_bathymetryAdjusted'] = discharge_bathymetry

src_df.to_csv(src, index=False)

else:
Expand Down Expand Up @@ -372,6 +381,11 @@ def correct_rating_for_ai_bathymetry(fim_dir, huc, strm_order, bathy_file_aibase

# Write src back to file
src_df = src_df.drop_duplicates(subset=['HydroID', 'Stage'], keep='first').reset_index(drop=True)

src_df3 = src_df.copy()
discharge_bathymetry2 = src_df3['Discharge (m3s-1)']
src_df['Discharge (m3s-1)_bathymetryAdjusted'] = discharge_bathymetry2

src_df.to_csv(src, index=False)

return log_text
Expand Down Expand Up @@ -653,7 +667,7 @@ def process_bathy_adjustment(
'--ai_toggle',
help='Toggle to apply ai_based bathymetry, ait = 1',
required=False,
default=0,
default=1,
type=int,
)
parser.add_argument(
Expand Down
Loading