Skip to content

Commit

Permalink
merge in healed HAND
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonPruitt-NOAA committed May 17, 2024
2 parents 4e252fe + 89109e7 commit ec43e66
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/deny_branch_zero.lst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ nld_rasterized_elev_{}.tif
nwm_catchments_proj_subset_levelPaths_{}.gpkg
nwm_subset_streams_levelPaths_{}.gpkg
nwm_subset_streams_levelPaths_dissolved_headwaters_{}.gpkg
osm_bridge_centroids_{}.gpkg
#osm_bridge_centroids_{}.gpkg
rem_{}.tif
#rem_zeroed_masked_{}.tif
slopes_d8_dem_meters_{}.tif
Expand Down
2 changes: 1 addition & 1 deletion config/deny_branches.lst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ nld_rasterized_elev_{}.tif
nwm_catchments_proj_subset_levelPaths_{}.gpkg
nwm_subset_streams_levelPaths_{}.gpkg
nwm_subset_streams_levelPaths_dissolved_headwaters_{}.gpkg
osm_bridge_centroids_{}.gpkg
#osm_bridge_centroids_{}.gpkg
#ras_elev_table.csv
rem_{}.tif
# rem_zeroed_masked_{}.tif
Expand Down
4 changes: 4 additions & 0 deletions config/params_template.env
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ export manual_calb_toggle="True"
export ncores_gw=1 # mpi number of cores for gagewatershed
export ncores_fd=1 # mpi number of cores for flow directions
export memfree=0G # min free memory required to start a new job or keep youngest job alive

#### Healed HAND ####
# Removes Hydro-conditioning Artifacts by subtractiong dem_thalweg_cond.tif from HAND_rem + DEM
export healed_hand_hydrocondition="True"
12 changes: 12 additions & 0 deletions src/delineate_hydros_and_produce_HAND.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,18 @@ python3 $srcDir/add_crosswalk.py \
-e $min_catchment_area \
-g $min_stream_length

## HEALED HAND -- REMOVES HYDROCONDITIONING ARTIFACTS ##
if ["$healed_hand_hydrocondition" = "True"] ; then #&& [ -f $tempCurrentBranchDataDir/dem_thalwegCond_$current_branch_id.tif ]
echo -e $startDiv"Healed HAND to Remove Hydro-conditioning Artifacts $hucNumber $current_branch_id"
gdal_calc.py --quiet --type=Float32 --overwrite --co "COMPRESS=LZW" --co "BIGTIFF=YES" --co "TILED=YES" \
-hr $tempCurrentBranchDataDir/rem_zeroed_masked_$current_branch_id.tif \
-d $tempCurrentBranchDataDir/dem_meters_$current_branch_id.tif \
-dt $tempCurrentBranchDataDir/dem_thalwegCond_$current_branch_id.tif \
--calc="hr+(d-dt)" --NoDataValue=$ndv \
--outfile=$tempCurrentBranchDataDir/"rem_zeroed_masked_$current_branch_id.tif"
fi


## HEAL HAND BRIDGES ##
if [ -f $tempHucDataDir/osm_bridges_subset.gpkg ]; then
echo -e $startDiv"Burn in bridges $hucNumber $current_branch_id"
Expand Down

0 comments on commit ec43e66

Please sign in to comment.