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

Stability dependent boundary-layer diffusion profile #2349

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

akshaysridhar
Copy link
Member

@akshaysridhar akshaysridhar commented Nov 9, 2023

Closes #2332

Corresponding issue in ClimaCoupler:
CliMA/ClimaCoupler.jl#485

@akshaysridhar akshaysridhar force-pushed the as/frierson-diff branch 2 times, most recently from b634aae to 5f6bf1a Compare November 16, 2023 19:35
@szy21
Copy link
Member

szy21 commented Nov 16, 2023

Should z be z - z_sfc for most places in this PR?

@akshaysridhar
Copy link
Member Author

akshaysridhar commented Nov 16, 2023

Should z be z - z_sfc for most places in this PR?

Yup - including an adjustment for surface elevation here: 77 h_boundary_layer = Spaces.level(ᶜz[colidx], level)[] > Currently testing this in the bomex_box_rhoe.jl offline.

@akshaysridhar akshaysridhar force-pushed the as/frierson-diff branch 6 times, most recently from b4ee76f to 60972bc Compare November 17, 2023 21:50
Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

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

Thanks Akshay! This mostly looks good. I left a few comments.

.buildkite/longruns/pipeline.yml Outdated Show resolved Hide resolved
.buildkite/pipeline.yml Outdated Show resolved Hide resolved
src/cache/temporary_quantities.jl Outdated Show resolved Hide resolved
src/utils/common_spaces.jl Outdated Show resolved Hide resolved
src/cache/temporary_quantities.jl Show resolved Hide resolved
@szy21
Copy link
Member

szy21 commented Nov 18, 2023

I just thought a bit more about this. If we use this version of vertical diffusion with bulk surface fluxes (DefaultExchangeCoefficient), it is somewhat inconsistent and may cause problems. For example, for stable regime we will have zero vertical diffusion but still strong surface fluxes (as the drag coefficient is fixed). Not sure if it will become unstable, but it may have some effect on the large-scale circulation. We can either keep both options, or use monin obukhov whenever we use vertical diffusion (but we should keep a test for bulk surface fluxes).

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.

LGTM, @akshaysridhar. Just a few small comments!

norm²_ua = norm_ua^2# SurfaceFluxes uses FT(1) gustiness #TODO Add to ClimaParameters?
return (grav * z) * (θ_v - θ_a) / (θ_a * norm²_ua + eps(FT))
end
function compute_diffusion_coefficient(
Copy link
Contributor

@LenkaNovak LenkaNovak Nov 20, 2023

Choose a reason for hiding this comment

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

I agree the C should be consistent, but may it be still beneficial to keep this formulation for the initial testing? Also, in the case of wanting to have a continuous diffusivity between the value derived from SurfaceFluxes.jl and the interior, I'm getting an extra \kappa factor in eqn 19 of Frierson. Maybe it's easier to talk offline about this.... Just discussed with @akshaysridhar this is consistent, as long as we use the MOST coefficient as in Byun 1990, already in SF.jl) , and that we could implement a test showing consistency between the surface flux and the implied diffusive flux at the surface.

@akshaysridhar akshaysridhar force-pushed the as/frierson-diff branch 4 times, most recently from fdf0ace to 945547c Compare November 22, 2023 20:56
@akshaysridhar
Copy link
Member Author

Day 75 (simulation in progress) Spatial Averages
friersondiffusion

@akshaysridhar
Copy link
Member Author

This branch as/frierson-refactor supersedes this PR content following the changes in #2404. I'll rebase once the current long-runs are complete.

@akshaysridhar
Copy link
Member Author

Day 260 (Spatial Averages and Instantaneous Surface / ToA Contours):
friersondiffusion

@akshaysridhar akshaysridhar force-pushed the as/frierson-diff branch 4 times, most recently from 6dede17 to 8165f6b Compare December 21, 2023 17:04
@akshaysridhar akshaysridhar force-pushed the as/frierson-diff branch 4 times, most recently from 53897c2 to 88d6c0a Compare January 5, 2024 21:12
@akshaysridhar
Copy link
Member Author

akshaysridhar commented Jan 5, 2024

@sriharshakandala Can you please take a look at the modifications to theperf/flame.jl file before we add this to the merge queue ?

@akshaysridhar akshaysridhar force-pushed the as/frierson-diff branch 7 times, most recently from f027436 to 81f5fa5 Compare January 9, 2024 00:31
Refactor to include diffusion tendency in implicit solver
	modified:   src/cache/precomputed_quantities.jl
	modified:   src/cache/temporary_quantities.jl
	modified:   src/prognostic_equations/vertical_diffusion_boundary_layer.jl
	modified:   src/solver/model_getters.jl
	modified:   src/solver/types.jl
	modified:   perf/flame.jl
	modified:   .buildkite/pipeline.yml
	modified:   config/perf_configs/flame_perf_target_frierson.yml
Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

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

Let's change the current aquaplanet without edmf to FriersonDiffusion and please feel free to merge it.

@akshaysridhar akshaysridhar added this pull request to the merge queue Jan 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 9, 2024
@szy21 szy21 added this pull request to the merge queue Jan 9, 2024
Merged via the queue into main with commit 8a9a93a Jan 9, 2024
11 of 13 checks passed
@szy21 szy21 deleted the as/frierson-diff branch January 9, 2024 22:22
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.

Make vertical diffusion dependent on topography Add a more realistic vertical diffusion
3 participants