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

Simplify surface function #2805

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Simplify surface function #2805

merged 1 commit into from
Mar 19, 2024

Conversation

charleskawczynski
Copy link
Member

#2800 revealed that we're not able to always inline. The first culprit we run into is surface_state_to_conditions, which is quite complicated. This PR breaks off the temperature computation into a separate function, and passes less data to the function.

This function call (to surface_state_to_conditions) is more expensive than the call to saturation adjustment, which involves a non-linear solve. So, there is clearly a performance issue.

Related issue: #2783.

@charleskawczynski
Copy link
Member Author

Is this breaking for the coupler? cc @LenkaNovak, @juliasloan25. If so, I'll update the news.

@juliasloan25
Copy link
Member

Is this breaking for the coupler? cc @LenkaNovak, @juliasloan25. If so, I'll update the news.

no it's not, thank you for checking though!

Copy link
Contributor

@LenkaNovak LenkaNovak left a comment

Choose a reason for hiding this comment

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

The restructuring LGTM (after resolving the current parsing errors) and shouldn't affect the coupler.

@charleskawczynski charleskawczynski added this pull request to the merge queue Mar 19, 2024
Merged via the queue into main with commit 64d60d7 Mar 19, 2024
11 checks passed
@charleskawczynski charleskawczynski deleted the ck/refactor_surface branch March 19, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants