-
Notifications
You must be signed in to change notification settings - Fork 10
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
Introduce an interface to allow attaching a prognostic atmosphere #322
base: main
Are you sure you want to change the base?
Conversation
PrognosticAtmosphere
…CliMA/ClimaOcean.jl into ss-glw-mk/branch-for-coupling-to-speedy
@@ -28,6 +29,10 @@ function time_step!(coupled_model::OceanSeaIceModel, Δt; callbacks=[], compute_ | |||
time_step!(sea_ice) | |||
end | |||
|
|||
# Time step the atmosphere | |||
# TODO: allow different time-steps for atmosphere and ocean | |||
time_step!(atmosphere) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow you have to ensure the time-step is size Δt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Numerically you can't change the time step in SpeedyWeather during the integration (well you can but it requires you to recompute the implicit solver). You can set it flexibly at initialization though. Whether ClimaOcean's dt is used in SpeedyWeather or SpeedyWeather's step is used in ClimaOcean I don't mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that ClimaOcean should manage the time-step and that the component models time-step should be set based on what ClimaOcean has.
If component models have some restriction then we need to design a way to manage that. This also means that TimeInterval
schedule cannot be used in the Simulation
of OceanSeaIceModel
.
Why don't we write a function like set_time_step!(atmosphere, dt)
(also for ocean
). Then SpeedyWeather will throw an error if dt
is different from its internal unchangeable time-step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or set_Δt!(atmosphere, Δt)
.
(we have discussed elsewhere about the fact that we often use "time step" as a noun Δt
as well as a verb for actually taking a time-step, ie time_step!
... a little annoying)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or set_time_step_size!(atmos, Δt)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally we choose our time step with Leapfrog(spectral_grid, Δt_at_T31=Minute(40))
with T31 being our default resolution and a linear scaling towards higher resolutions that's automatically applied. But with SpeedyWeather/SpeedyWeather.jl#650 I've just created a PR that also allows to set!
the time step more explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being dull --- do you mean that #650 makes it so that the user can choose the time-step when setting up a SpeedyWeather simulation?
This PR reorganizes a bit the code to allow for a prognostic atmosphere, which means adding some interfaces that can be extended in the atmosphere we want to couple with