Skip to content

Commit

Permalink
Fixes random assortment of bugs
Browse files Browse the repository at this point in the history
As discovered by the apocalyptic testing of the
last deployment to TI
  • Loading branch information
shawncrawley committed Nov 20, 2024
1 parent d4311c6 commit 558d5c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ def create_inundation_output(huc8, branch, stage_lookup, reference_time, input_v
else:
stages = stage_lookup['stage_m'].tolist() # uses the interpolated stage value for the extent

k = np.array(hydroids) # Create a feature numpy array from the list
v = np.array(stages) # Create a stage numpy array from the list
hydroids = np.array(hydroids) # Create a feature numpy array from the list
stages = np.array(stages) # Create a stage numpy array from the list

hydro_id_max = k.max() # Get the max feature id in the array
hydro_id_max = hydroids.max() # Get the max feature id in the array

hand_nodata = hand_dataset.nodata # get the no_data value for the HAND raster
hand_dtype = hand_dataset.dtypes[0] # get the dtype for the HAND raster
Expand Down Expand Up @@ -427,7 +427,7 @@ def process(window):
# Create a stage mapper that will convert hydroids to their corresponding stage. -9999 is null or
# no value. we cant use 0 because it will mess up the mapping and use the 0 index
mapping_ar = np.full(mapping_ar_max+1, -9999, dtype="float32")
mapping_ar[k] = v
mapping_ar[hydroids] = stages

catchment_window[catchment_window == catchment_nodata] = 0 # Convert catchment values to 0 where the catchment = catchment_nodata # noqa
catchment_window[hand_window == hand_nodata] = 0 # Convert catchment values to 0 where the HAND = HAND_nodata. THis will ensure we are only processing where we have HAND values! # noqa
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
product: mrf_gfs_10day_max_inundation_ak
configuration: medium_range_alaska_mem1
product_type: "fim"
domain: alaska
domain: ak
run: true

ingest_files:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
product: mrf_nbm_5day_max_inundation_ak
configuration: medium_range_blend_alaska
product_type: "fim"
domain: alaska
domain: ak
run: true

ingest_files:
Expand Down

0 comments on commit 558d5c2

Please sign in to comment.