diff --git a/components/eamxx/src/share/io/scream_output_manager.cpp b/components/eamxx/src/share/io/scream_output_manager.cpp index ccec5f516fd..13e2e97101b 100644 --- a/components/eamxx/src/share/io/scream_output_manager.cpp +++ b/components/eamxx/src/share/io/scream_output_manager.cpp @@ -328,7 +328,11 @@ void OutputManager::run(const util::TimeStamp& timestamp) return; } - EKAT_REQUIRE_MSG (timestamp<=m_output_control.next_write_ts, + // Ensure we did not go past the scheduled write time without hitting it + EKAT_REQUIRE_MSG ( + (m_output_control.frequency_units=="nsteps" + ? timestamp.get_num_steps()<=m_output_control.next_write_ts.get_num_steps() + : timestamp<=m_output_control.next_write_ts), "Error! The input timestamp is past the next scheduled write timestamp.\n" " - current time stamp : " + timestamp.to_string() + "\n" " - next write time stamp: " + m_output_control.next_write_ts.to_string() + "\n"