Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coupled timesteps sync test #1100

Open
raphaeldussin opened this issue Apr 29, 2020 · 2 comments
Open

coupled timesteps sync test #1100

raphaeldussin opened this issue Apr 29, 2020 · 2 comments

Comments

@raphaeldussin
Copy link
Contributor

https://github.com/NOAA-GFDL/MOM6/blob/12853fa5581c7b8c4605c94dccafca64c332863a/src/core/MOM.F90#L775

I think this should be:

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.

@Hallberg-NOAA thoughts?

@Hallberg-NOAA
Copy link
Collaborator

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.

@raphaeldussin
Copy link
Contributor Author

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/70cfd64c8e04bc550eb0603060230a5e2b7ac4f3/config_src/coupled_driver/ocean_model_MOM.F90#L574

there is some logic using thermo_spans_coupling several lines down (after the last else) but it doesn't look like that this condition is realized.

At least this explains why dtdia is not set properly. Do we miss a .not. thermo_spans_coupling in line 574?

@raphaeldussin raphaeldussin changed the title bug in sync test coupled timesteps sync test Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants