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

clean up component model initialization #1011

Open
Tracked by #1050
juliasloan25 opened this issue Oct 10, 2024 · 0 comments
Open
Tracked by #1050

clean up component model initialization #1011

juliasloan25 opened this issue Oct 10, 2024 · 0 comments

Comments

@juliasloan25
Copy link
Member

There are a couple of problems with how we currently initialize component models:

  • We initialize a land model even if it isn't used (masked out later) in the slabplanet_aqua case, and initialize ocean even if it isn't used in the slabplanet_terra case
  • There is a lot of redundancy in setting up component models for each of the different mode types we use our driver for (amip, slabplanet, etc)

Possible solutions to this are:

  • Smaller if/else chunks where we check the mode names and come up with flags to pass to generic component model constructors that dispatch off of them. E.g. we could have land_init(:bucket), land_init(nothing) that return different land model types
  • Separate the driver into one for AMIP and one for slabplanet
    • would still need to handle the aqua/terra cases specially
    • would cause some code duplication between drivers
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

No branches or pull requests

1 participant