Skip to content

Conversation

@haakon-e
Copy link
Member

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

This pull request refactors and improves the implementation and documentation of the eddy diffusivity coefficient calculation and its application in the vertical diffusion boundary layer tendency routines. The main changes include moving coefficient helper functions to a more appropriate file, enhancing documentation, simplifying function signatures, and improving code clarity and maintainability.

Refactoring and code organization:

  • Moved the definitions of eddy_diffusivity_coefficient_H and eddy_diffusivity_coefficient from precomputed_quantities.jl to eddy_diffusivity_coefficient.jl, consolidating all eddy diffusivity logic in one place. [1] [2]
  • Inlined these helper functions into the main coefficient computation functions and updated their signatures for clarity and directness.

Documentation and interface improvements:

  • Added detailed docstrings to ᶜcompute_eddy_diffusivity_coefficient for both DecayWithHeightDiffusion and VerticalDiffusion models, explaining the formulas, arguments, and usage.
  • Simplified and clarified function signatures for vertical_diffusion_boundary_layer_tendency!, removing unnecessary arguments and improving readability.

Boundary layer tendency routine enhancements:

  • Refactored the computation of divergence operators and enthalpy/trace diffusion to use clearer variable names, reduce redundancy, and improve maintainability. [1] [2]
  • Unified the handling of divergence operators for energy and tracer diffusion, and streamlined the application of boundary conditions. [1] [2]

@haakon-e haakon-e force-pushed the he/rft-clean-up-diagnostics branch 3 times, most recently from 9405d3c to a85a7a4 Compare November 20, 2025 17:40
@haakon-e haakon-e changed the base branch from main to he/rft-edmfx-diagnostics November 20, 2025 17:45
@haakon-e haakon-e force-pushed the he/rft-clean-up-diagnostics branch from a85a7a4 to 0b16fd3 Compare November 20, 2025 17:45
@haakon-e haakon-e changed the title rft: clean up diagnostics rft: eddy diffusivity docstrings Nov 20, 2025
@haakon-e haakon-e marked this pull request as ready for review November 20, 2025 17:47
@haakon-e haakon-e force-pushed the he/rft-edmfx-diagnostics branch from 7cf36f5 to 7045125 Compare November 21, 2025 05:09
@haakon-e haakon-e force-pushed the he/rft-clean-up-diagnostics branch from 0b16fd3 to 32cc140 Compare November 21, 2025 05:09
@haakon-e haakon-e force-pushed the he/rft-edmfx-diagnostics branch from 7045125 to bb63713 Compare November 21, 2025 05:31
@haakon-e haakon-e force-pushed the he/rft-clean-up-diagnostics branch from 32cc140 to 9004d38 Compare November 21, 2025 05:33
@haakon-e haakon-e force-pushed the he/rft-edmfx-diagnostics branch from bb63713 to f131c57 Compare November 25, 2025 00:57
@haakon-e haakon-e force-pushed the he/rft-clean-up-diagnostics branch from 9004d38 to 8f9cb8c Compare November 25, 2025 00:57
@haakon-e haakon-e changed the base branch from he/rft-edmfx-diagnostics to main November 25, 2025 21:58
@haakon-e haakon-e force-pushed the he/rft-clean-up-diagnostics branch from 8f9cb8c to 9355400 Compare November 25, 2025 21:58
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.

2 participants