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

Add CoupledSimulation constructors for AMIP and Slabplanet cases #1139

Open
juliasloan25 opened this issue Jan 15, 2025 · 0 comments
Open

Add CoupledSimulation constructors for AMIP and Slabplanet cases #1139

juliasloan25 opened this issue Jan 15, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@juliasloan25
Copy link
Member

juliasloan25 commented Jan 15, 2025

After the changes made in #1136, #1137, and #1138, the only differences between AMIP and slabplanet cases will be in initialization. This provides an opportunity for us to streamline our code by limiting any notion of a mode type to the initialization stage, and providing CoupledSimulation constructors for the AMIP and Slabplanet cases. This will allow the user to set up a simulation in 1 of 3 ways: a pre-determined stable AMIP or Slabplanet configuration, a variant of these configurations with specific defaults overwritten (e.g. aquaplanet or using a different parameterization), or a custom simulation using user-defined component model simulations.

These constructors will look something like this:

CoupledSimulation(::AMIPMode; dt = nothing, dt_atmos = dt, dt_land = dt, ...)
  - ensure consistency between component models (e.g. compatible dts)
  - for each component model, construct simulation (note: don't require all 3 surface models)
  - fully initialize and sync comopnents, ensuring consistency (note: not entirely possible given current state of models)
  - set up callbacks, diagnostics, etc
  return CoupledSimulation(atmos_model, surface_models, dt_cpl, callbacks, diags, ...)
end

Note that this method will take in many arguments because it must receive everything needed to construct all component models and the coupled simulation. It has defaults for all arguments except for the mode type so it's very easy for a user to construct a pre-defined stable simulation, or to overwrite specific arguments as desired. Additionally, users will be able to construct a CoupledSimulation from component models they create themselves by using the built-in constructor rather than these mode-specific methods.

This should be implemented in a way that also closes #1069
Part of #1011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants