From 45c6860c85cda8d1ac3e23dec4ab2fae3da3efaf Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Fri, 9 Aug 2024 12:41:57 -0400 Subject: [PATCH] fix: error out if shortest_time_between_assimilations <=0 shortest_time_between_assimilations is get_model_time_step fixes #535 --- assimilation_code/modules/assimilation/obs_model_mod.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assimilation_code/modules/assimilation/obs_model_mod.f90 b/assimilation_code/modules/assimilation/obs_model_mod.f90 index 0f04dd1db2..d6fd096f02 100644 --- a/assimilation_code/modules/assimilation/obs_model_mod.f90 +++ b/assimilation_code/modules/assimilation/obs_model_mod.f90 @@ -157,6 +157,9 @@ subroutine move_ahead(ens_handle, ens_size, seq, last_key_used, window_time, & ! Compute the model time step and center a window around the closest time delta_time = get_model_time_step() +if (delta_time <= set_time(0,0)) then + call error_handler(E_ERR, 'move_ahead', 'shortest_time_between_assimilations must be > 0', source) +endif ! print out current window, if requested if (print_trace_details > 0) then