Skip to content

Conversation

nefrathenrici
Copy link
Member

Purpose

Adds a new AtmosSimulation constructor, closes #3894.

The current AtmosConfig/parsed_args system is monolithic and hard to use programmatically. This PR introduces a more composable constructor that makes it easier to create simulations programmatically and reduces coupling between configuration parsing and simulation setup.

Content

  • Added a new AtmosSimulation constructor that provides a cleaner API without requiring AtmosConfig/parsed_args
  • Introduced domain abstractions (SphereDomain, ColumnDomain, etc.) to replace parsed_args-based spatial configuration. This could use ClimaCore directly, as mentioned by @Sbozzolo.
  • Added default_model_callbacks to get callbacks from model info.
  • Added common_callbacks for standard simulation callbacks (NaN checks, conservation, etc.)
  • Refactored topography and mesh warp parsed_args into type hierarchies

To-do

  • Add unit tests
  • Unify get_callbacks and common_callbacks
  • Obtain tracers from model info
  • Validate
    • diagnostic/checkpoint frequencies match
    • reproducible restarts
    • callback frequencies with dt
  • Add netcdf_interpolation_num_points and netcdf_output_at_levels
  • Add support for scm forcing callbacks and other missing callbacks
  • "verbose" option with all the logging from get_simulation
  • More flexible timestepping configuration, some parsed_args are not supported
  • Improve simulation validation with informative errors

  • I have read and checked the items on the review checklist.

const DEFAULT_BUBBLE = false
const DEFAULT_DEEP_ATMOSPHERE = true
const DEFAULT_H_ELEM = 6
const DEFAULT_RADIUS = 6.371229e6
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be a parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AtmosSimulation Constructor Refactor

1 participant