NOAA-OWP / ras2fim

Creation of flood inundation raster libraries and rating curves from HEC-RAS models.
Other
51 stars 13 forks source link

[8pt] worker_fim_rasters: wse errors #131

Open RobHanna-NOAA opened 1 year ago

RobHanna-NOAA commented 1 year ago

During full scale ras2fim pipeline runs, two HUCs showed what appears to be related errors:

These were seen with the following: 12090301


Error: str_feature_id = 5790994 cannot convert float NaN to integer Traceback (most recent call last): File "C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py", line 1304, in fn_main_hecras river = fn_create_hecras_files(str_feature_id, str_geom_path, flt_ds_xs, flt_us_xs, int_max_q, str_hecras_path_to_create, tpl_settings) File "C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py", line 1237, in fn_create_hecras_files fn_run_hecras(str_ras_projectpath, int_max_flow, model_unit, tpl_settings) File "C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py", line 687, in fn_run_hecras int_max_wse = int(max(list_avg_water_surface_elev) // flt_interval) ValueError: cannot convert float NaN to integer

for more details.. see the 05_hecras_output / errors_found.log


Some also showed a slightly different error saying C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py:646: RuntimeWarning: invalid value encountered in multiply arr_multiply_wse = arr_avg_water_surface_elev * arr_channel_length C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py:687: RuntimeWarning: invalid value encountered in double_scalars int_max_wse = int(max(list_avg_water_surface_elev) // flt_interval)


Error: str_feature_id = 5789214 cannot convert float NaN to integer Traceback (most recent call last): File "C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py", line 1304, in fn_main_hecras river = fn_create_hecras_files(str_feature_id, str_geom_path, flt_ds_xs, flt_us_xs, int_max_q, str_hecras_path_to_create, tpl_settings) File "C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py", line 1237, in fn_create_hecras_files fn_run_hecras(str_ras_projectpath, int_max_flow, model_unit, tpl_settings) File "C:\Users\rdp-user\Projects\ras2fim-dev\ras2fim\src\worker_fim_rasters.py", line 687, in fn_run_hecras int_max_wse = int(max(list_avg_water_surface_elev) // flt_interval) ValueError: cannot convert float NaN to integer

for more details.. see the 05_hecras_output / errors_found.log

EmilyDeardorff commented 1 year ago

I was unable to recreate this issue with 12040101 on my EC2. When I looked for the error log, there was no error log. I am unsure whether the error logging just didn't work or if the issue actually didn't occur.

The image below is the models I used and this is the ras2fim.py command that I used:

python ras2fim.py -w 12040101 -p ESRI:102739 -t C:\ras2fim_data\inputs\3dep_dems\HUC8_10m_5070\HUC8_12040101_dem.tif -o C:\Users\rdp-user\projects\debug_12040101_WSE\test_outputs -i C:\ras2fim_data\OWP_ras_models\wse_errors_12040101

image

RobHanna-NOAA commented 1 year ago

You can open pretty much any 05_hecras_output/error_found.csv and look in the err column for "cannot convert float NaN to interger). See s3://ras2fim/output_ras2fim/12090301_2277_230804/05_hecras_output/error_found.csv and it will give you some sample models to try it on.