Skip to content

Remove side-effects of compute_budget_mld and compute_tracer_at_mlb - #93

Merged
rmholmes merged 3 commits into
mixed_layer_tracer_diagnostics_nrifrom
mixed_layer_tracer_diagnostics_nri_wrk
Aug 31, 2026
Merged

rmholmes merged 3 commits into
mixed_layer_tracer_diagnostics_nrifrom
mixed_layer_tracer_diagnostics_nri_wrk

Conversation

@dougiesquire

@dougiesquire dougiesquire commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

@rmholmes, this is what I had in mind with my review comment.

I've added private wrk arrays that are used by calc_mixed_layer_depth and compute_budget_mld so that those routines have no side-effects on public wrk arrays.

This means we no longer need to make wrk array copies when using compute_budget_mld and compute_tracer_at_mlb in blocks that utilise the public wrk arrays.

I also noticed two bugs along the way so I've fixed those (my second and third commits)

Have a look and if you're happy with this we can merge it into your branch.

@rmholmes

Copy link
Copy Markdown
Collaborator

Looks great to me Dougie. What you've implemented is way cleaner than what I had done, which was really a quick-and-dirty, get it working!

@rmholmes
rmholmes merged commit 26dd1ad into mixed_layer_tracer_diagnostics_nri Aug 31, 2026
1 of 6 checks passed
@dougiesquire
dougiesquire deleted the mixed_layer_tracer_diagnostics_nri_wrk branch August 31, 2026 02:13
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