Severity: minor (diagnosability)
Where: src/nhflodata/get_paths.py:109.
Problem. When NHFLODATA_LOCATION is set but the resolved versioned folder is absent (e.g. the local data folder still holds bodemlagen_pwn_2024/v1.0.0 while registry 'latest' is v2.0.0), get_abs_data_path merely logs a warning and returns the nonexistent Path. The consuming script then runs expensive REGIS/AHN downloads and grid refinement before crashing deep inside a reader, far from the actual cause.
Suggested fix. Add a strict/required flag (default True for location 'local'/'get_from_env' with the env var set) that raises FileNotFoundError in get_abs_data_path itself, naming the dataset, resolved version, and NHFLODATA_LOCATION.
From a systematic review of modelscripts/09pwnmodel2/01_pwnmodel2.py and its dependency stack (nhflotools, nhflodata, nlmod), July 2026. Every finding was traced through the actual code and adversarially verified before filing.
Severity: minor (diagnosability)
Where:
src/nhflodata/get_paths.py:109.Problem. When
NHFLODATA_LOCATIONis set but the resolved versioned folder is absent (e.g. the local data folder still holdsbodemlagen_pwn_2024/v1.0.0while registry'latest'isv2.0.0),get_abs_data_pathmerely logs a warning and returns the nonexistentPath. The consuming script then runs expensive REGIS/AHN downloads and grid refinement before crashing deep inside a reader, far from the actual cause.Suggested fix. Add a strict/required flag (default True for
location'local'/'get_from_env'with the env var set) that raisesFileNotFoundErroringet_abs_data_pathitself, naming the dataset, resolved version, andNHFLODATA_LOCATION.From a systematic review of
modelscripts/09pwnmodel2/01_pwnmodel2.pyand its dependency stack (nhflotools, nhflodata, nlmod), July 2026. Every finding was traced through the actual code and adversarially verified before filing.