You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (CS%diabatic_first .and.abs(CS%t_dyn_rel_thermo -dtdia) > 1e-6*dtdia) call blah
using THERMO_SPANS_COUPLING = True and dt_cpld = 3600 with dt_therm = 7200 and dt = 900,
dtdia is set to 3600. t_dyn_rel_thermo varies between - dtdia and dtdia and t_dyn_rel_adv between 0 and 2*dtdia. t_dyn_rel_thermo is one dtdia behind t_dyn_rel_adv at all times so the test should check for t_dyn_rel_thermo -dtdia not being > 0 (it should be zero actually). In which case t_dyn_rel_thermo is exactly between 2 thermodynamics steps when do_advection happens.
Upon further reflection, I am beginning to think that the test in this error message is right, but there is a bug elsewhere in the code with keeping track of time and the phases of the solver. The advective and thermodynamic timesteps are supposed to be the same, and this is a test that they are.
I think that the central problem here is that dtdia should be equal to dt_therm in this case, but it is not.
going further down the rabbit hole, I found out that step_MOM is called with time interval = coupled timestep and not dt_therm. This comes from the coupled driver here:
https://github.com/NOAA-GFDL/MOM6/blob/12853fa5581c7b8c4605c94dccafca64c332863a/src/core/MOM.F90#L775
I think this should be:
using THERMO_SPANS_COUPLING = True and dt_cpld = 3600 with dt_therm = 7200 and dt = 900,
dtdia is set to 3600. t_dyn_rel_thermo varies between - dtdia and dtdia and t_dyn_rel_adv between 0 and 2*dtdia. t_dyn_rel_thermo is one dtdia behind t_dyn_rel_adv at all times so the test should check for t_dyn_rel_thermo -dtdia not being > 0 (it should be zero actually). In which case t_dyn_rel_thermo is exactly between 2 thermodynamics steps when do_advection happens.
@Hallberg-NOAA thoughts?
The text was updated successfully, but these errors were encountered: