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

Update combine_surfaces! #317

Closed
9 tasks done
LenkaNovak opened this issue Jun 3, 2023 · 0 comments · Fixed by #316
Closed
9 tasks done

Update combine_surfaces! #317

LenkaNovak opened this issue Jun 3, 2023 · 0 comments · Fixed by #316
Assignees

Comments

@LenkaNovak
Copy link
Collaborator

LenkaNovak commented Jun 3, 2023

Before running the functionality that calculates fluxes over multiple arbitrary surfaces, as specified in #311 , we need to update combine_surfaces! and update_surface_fractions. This includes a new Interfacer module that prescribes the component model interfaces. This is a prequel to the ClimaEarth.jl design, and a step towards having a source code that has no dependencies on the data structures of the underlying component models.

Components

  • update code with interface changes
  • add unit tests for Interfacer
  • update slabpanet
  • update AMIP

QA

  • the same behavior compared to current main recovered
    • conservation
    • AMIP paperplots
  • comparable performance to the current main
  • CI unit tests pass

Note on the design

  • we're using a function get_field(sim::ComponentModelSimulation, ::Val(:{field_of_interest})) for now, which allows model-agnostic field specification, as well as definition of wrapper methods, such as get_field(sim::ComponentModelSimulation, ::Val, colidx). While we could define variable-specific functions, e.g. get_termperature, and use anonymous functions for the wrapper functions, the wrapper functions would be less transparent and may cause conflicts with methods of the same signature. Alternatively, we could define each variable as a struct object upon which we dispatch, but this adds a bit more code and less flexibility when developing. The current solution seems like a good temporary compromise.
This was referenced Jun 3, 2023
@LenkaNovak LenkaNovak self-assigned this Jun 6, 2023
@bors bors bot closed this as completed in #316 Jun 8, 2023
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 a pull request may close this issue.

1 participant