Skip to content

Point initialization simulations can segfault if requested start/stop times are outside the range of times in station file times. #586

@nwagenbrenner

Description

@nwagenbrenner

Reported by user:

Hello Wind Ninja team,
I am using windninja CLI on Ubuntu 20.04. I have set up wind ninja on a server to automatically run an hourly point initialization of station points collected and stored on disk for each of the 4 counties in Hawaii.

So far it has been running fine on our largest domain Hawaii county (BI) however when I run any other domain / dem, such as Kauai (KA) windninja fails quickly without any message except a 139 code. I am baffled because the cmd windninja call is identical, except dem, input files and paths. I even went as far as to recreate and align the dem for both BI and KA in the same exact manner with the same resolution, and crs. I also checked and compared formatting and data of the station input files for both. Even after this only BI allowed a windninja run to proceed, and KA failed with a 139 exit code which I assume is C++ indicating a segmentation fault?

Below are the windninja commands for the BI and KA respectively. Additionally I also attached a zipped folder with the directories and files in the locations mentioned in the windninja cmd (without dirs: /home/wn1/). This includes station input files, and dem used in this Apr 8th 2025 23:00 hourly run. Just to reiterate, using this cmd and respective input data (included) BI ran fine but KA fails with a 139 exit code. Except for the BI, this happens for all other domains/dem for any date-time I tried. Is there a bug I need to know about or something missing or need to fix? Any ideas would be a great help. Thanks again for all your hard work, this is a great program and project.

BI windninja cmd (works) :
/home/wn1/wn_build/src/cli/WindNinja_cli --num_threads=1 --elevation_file=/home/wn1/data/dem/BI_utm_z4.tif --initialization_method=pointInitialization --time_zone=UTC --match_points=true --fetch_type=stid --wx_station_filename=/home/wn1/data/input/wn_input/20250407_2300/BI/BI_stations.csv --write_wx_station_kml=false --output_wind_height=10.0 --units_output_wind_height=m --vegetation=grass --mesh_resolution=250 --units_mesh_resolution=m --ascii_out_resolution=250 --units_ascii_out_resolution=m --write_goog_output=false --write_shapefile_output=false --write_ascii_output=true --write_farsite_atm=false --output_path=/home/wn1/data/output/wn_out/20250407_2300/BI --momentum_flag=false --start_year=2025 --start_month=04 --start_day=07 --start_hour=23 --start_minute=00 --stop_year=2025 --stop_month=04 --stop_day=08 --stop_hour=00 --stop_minute=00 --number_time_steps=1

KA windninja cmd (fails with 139 exit code):
/home/wn1/wn_build/src/cli/WindNinja_cli --num_threads=1 --elevation_file=/home/wn1/data/dem/KA_utm_z4.tif --initialization_method=pointInitialization --time_zone=UTC --match_points=true --fetch_type=stid --wx_station_filename=/home/wn1/data/input/wn_input/20250407_2300/KA/KA_stations.csv --write_wx_station_kml=false --output_wind_height=10.0 --units_output_wind_height=m --vegetation=grass --mesh_resolution=250 --units_mesh_resolution=m --ascii_out_resolution=250 --units_ascii_out_resolution=m --write_goog_output=false --write_shapefile_output=false --write_ascii_output=true --write_farsite_atm=false --output_path=/home/wn1/data/output/wn_out/20250407_2300/KA --momentum_flag=false --start_year=2025 --start_month=04 --start_day=07 --start_hour=23 --start_minute=00 --stop_year=2025 --stop_month=04 --stop_day=08 --stop_hour=00 --stop_minute=00 --number_time_steps=1

Answer:

The issue is that you have the stop time set to 04/08/2025, but you only have data for KA at 04/07/2025 2300Z. If you change your start and stop times to the single time step you have (04/07/2025 2300Z) the simulation runs. The station files for your other DEM have at least one observation at 04/08/2025 0000z which is why that one runs. We need to add a better check on the start/stop times compared to the station times and properly handle and report this error.

See data attached to reproduce the bug.

data.zip

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions