From af612e88feedb4c3600f7d56e3838eb5baef8cd6 Mon Sep 17 00:00:00 2001 From: Chris Marsh Date: Mon, 3 Jun 2024 22:27:57 -0600 Subject: [PATCH] Enforce the wind direction criteria of interval [0,360) instead of erroring out --- src/modules/interp_met/WindNinja.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/interp_met/WindNinja.cpp b/src/modules/interp_met/WindNinja.cpp index 2d17ab71..e32c3053 100644 --- a/src/modules/interp_met/WindNinja.cpp +++ b/src/modules/interp_met/WindNinja.cpp @@ -284,7 +284,8 @@ void WindNinja::run(mesh& domain) if ((*s)["vw_dir"_s] >= 360.0) { - CHM_THROW_EXCEPTION(module_error, "Wind direction >=360, must be on interval [0,360)"); + // enforce the criteria that direction must be on interval [0,360) + (*s)["vw_dir"_s] = (*s)["vw_dir"_s] - 360.0; } double theta = (*s)["vw_dir"_s] * M_PI / 180.;