NOAA-OWP / inundation-mapping

Flood inundation mapping and evaluation software configured to work with U.S. National Water Model.
Other
94 stars 29 forks source link

[3pt] Post Processing error scan might not be working #1310

Open RobHanna-NOAA opened 1 week ago

RobHanna-NOAA commented 1 week ago

During hand_4_5_10_0 run, the error log scan failed to pick up some errors in the unit folders. This suggests there is a problem with the tool.


find $outputDestDir -type f | grep -H -r -i -n "error" $outputDestDir/logs/ > \
     $outputDestDir/all_errors_from_logs.log &
l_echo "error scan done, now on to warnings scan"

failed to see the errors in all three of the 19x files in hand_4_5_10_0/logs/unit/ ie). 19020301_unit.log.


What is strange is that the twin test for "warnings" is working, so how did errors miss those three unit files/

Debugging notes:


Update: Oct 8th It also failed to pick up errors from the agg_by_huc_errors folder. hummmm

RobHanna-NOAA commented 1 week ago

Actually, using the hand_4_5_10_0 folder and changing that error script tool to just run at command line, I have another idea. Instead of it saying -n "error" try it at -n "error". It might be catching the word when it sees the word "error" only and not things like "indexerror". Its is a guess. Make sure you keep the original output error file for comparison. There was also one file in the src_optimize folder (?? or similar) that our tool missed it in the scan.

RobHanna-NOAA commented 4 days ago

I figured out the fix. It needs wildcards. find . -type f | grep -H -R -i -n ".*error.*" ./logs/ > ./all_errors_from_logs_3.log (adjust it for the patterns in post processing and also apply to the warning tests. It finds a lot more info. It was only finding records with a full non-case sensitive match of errors or warnings. Now it can find things like "fielderrors".