-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some bugs Widen benchmarks, fix CPU-GPU dispatch Fix code loading Specialize in gpu pointwise kernels Fix adapt call Ensure has_uniform_datalayouts for cuda copyto Dont limit recursion in get_struct_linear Bump allocation limit, add mem to benchmark stencil job Specialize HF for fused kernels Simplify n_dofs Add some docs and change HorizontalLayout to horizontal_layout_type Apply formatter Revert n_ndofs simplification Add some unit tests, and fix empty field edge cases Add some comments, use todata for some broadcasted objects Forward todata, extend onExtrudedBroadcasted Apply formatter Use more non-specific DimensionMismatch error Add a new unit test Add more unit tests with edge case fixes Fix more edge cases
- Loading branch information
1 parent
7297f5d
commit c450698
Showing
51 changed files
with
2,471 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using ClimaCorePlots, Plots | ||
using ClimaCore.DataLayouts | ||
|
||
include("baroclinic_wave_utilities.jl") | ||
|
||
const sponge = false | ||
|
||
# Variables required for driver.jl (modify as needed) | ||
horizontal_mesh = cubed_sphere_mesh(; radius = R, h_elem = 4) | ||
npoly = 4 | ||
z_max = FT(30e3) | ||
z_elem = 10 | ||
t_end = FT(60 * 60 * 24 * 10) | ||
dt = FT(400) | ||
dt_save_to_sol = FT(60 * 60 * 24) | ||
dt_save_to_disk = FT(0) # 0 means don't save to disk | ||
ode_algorithm = CTS.SSP333 | ||
jacobian_flags = (; ∂ᶜ𝔼ₜ∂ᶠ𝕄_mode = :no_∂ᶜp∂ᶜK, ∂ᶠ𝕄ₜ∂ᶜρ_mode = :exact) | ||
|
||
additional_cache(ᶜlocal_geometry, ᶠlocal_geometry, dt) = merge( | ||
hyperdiffusion_cache(ᶜlocal_geometry, ᶠlocal_geometry; κ₄ = FT(2e17)), | ||
sponge ? rayleigh_sponge_cache(ᶜlocal_geometry, ᶠlocal_geometry, dt) : (;), | ||
) | ||
function additional_tendency!(Yₜ, Y, p, t) | ||
hyperdiffusion_tendency!(Yₜ, Y, p, t) | ||
sponge && rayleigh_sponge_tendency!(Yₜ, Y, p, t) | ||
end | ||
|
||
center_initial_condition(local_geometry) = | ||
center_initial_condition(local_geometry, Val(:ρe)) | ||
function postprocessing(sol, output_dir) | ||
@info "L₂ norm of ρe at t = $(sol.t[1]): $(norm(sol.u[1].c.ρe))" | ||
@info "L₂ norm of ρe at t = $(sol.t[end]): $(norm(sol.u[end].c.ρe))" | ||
|
||
anim = Plots.@animate for Y in sol.u | ||
ᶜv = Geometry.UVVector.(Y.c.uₕ).components.data.:2 | ||
Plots.plot(ᶜv, level = 3, clim = (-6, 6)) | ||
end | ||
Plots.mp4(anim, joinpath(output_dir, "v.mp4"), fps = 5) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.