Skip to content

Conversation

@haakon-e
Copy link
Member

@haakon-e haakon-e commented Nov 25, 2025

This pull request primarily refactors and cleans up the code in the surface conditions and surface flux modules, focusing on improving readability and maintainability without changing core logic. The changes involve consolidating multi-line expressions into single lines, improving destructuring and broadcasting, and removing unnecessary variables. There are no significant algorithmic or behavioral changes.

Key refactoring and cleanup changes:

Surface conditions module (src/surface_conditions/surface_conditions.jl):

  • Consolidated multi-line variable assignments and function calls into single lines throughout, improving readability [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12].
  • Improved destructuring of external forcing inputs for clarity.
  • Used cospi for surface temperature calculation, simplifying trigonometric expressions.
  • Removed unused variables and unnecessary comments for conciseness.
  • Cleaned up struct construction and field assignment for surface conditions [1] [2].

Surface state module (src/surface_conditions/surface_state.jl):

  • Reformatted struct definitions and constructors to single lines for conciseness [1] [2] [3] [4].

Surface flux tendency (src/prognostic_equations/surface_flux.jl):

  • Refactored calculation of total specific enthalpy for clarity and efficiency.

These changes are focused on code style and maintainability, making the codebase easier to read and modify without altering its functionality.

@haakon-e haakon-e changed the base branch from he/rft-clean-up-diagnostics to main November 25, 2025 21:57
@haakon-e haakon-e force-pushed the he/rft-clean-surface-code branch from da52bea to 86340ad Compare November 25, 2025 21:57
@haakon-e haakon-e force-pushed the he/rft-clean-surface-code branch 3 times, most recently from 9db0d1c to d241e6d Compare December 9, 2025 01:30
@haakon-e haakon-e added this pull request to the merge queue Dec 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2025
- format expressions for improved readability
@haakon-e haakon-e force-pushed the he/rft-clean-surface-code branch from d241e6d to 2cd60e3 Compare December 10, 2025 17:48
@haakon-e haakon-e enabled auto-merge December 10, 2025 17:50
@haakon-e haakon-e added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit b3dd081 Dec 10, 2025
29 of 30 checks passed
@haakon-e haakon-e deleted the he/rft-clean-surface-code branch December 10, 2025 21:03
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.

3 participants