Skip to content

Commit

Permalink
Speed up Schar mountain test
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisYatunin committed Jul 11, 2024
1 parent cc1e865 commit 5390243
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/model_configs/plane_analytic_schar_mountain_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ config: "box"
FLOAT_TYPE: "Float64"
initial_condition: "ConstantBuoyancyFrequencyProfile"
topography: "Schar"
x_max: 200e3
x_max: 100e3
y_max: 2e3
z_max: 21e3
x_elem: 200
x_elem: 100
y_elem: 2
z_elem: 100
z_stretch: false
dt: "0.5secs"
t_end: "24hours"
t_end: "18hours"
rayleigh_sponge: true
toml: [toml/analytic_mountain_test.toml]
analytic_check: true
Expand Down
4 changes: 2 additions & 2 deletions src/analytic_solutions/analytic_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ background_u(::Type{FT}) where {FT} = FT(10)
model_top(::Type{FT}) where {FT} = FT(21e3)

schar_topography_parameters(::Type{FT}) where {FT} =
(; h_max = FT(25), λ = FT(4e3), a = FT(5e3), x_center = FT(100e3))
(; h_max = FT(25), λ = FT(4e3), a = FT(5e3), x_center = FT(50e3))
cosine_topography_parameters(::Type{FT}) where {FT} =
(; h_max = FT(25), λ = FT(100e3))

Expand Down Expand Up @@ -168,7 +168,7 @@ function schar_predicted_velocity(params, coord)
n_efolds = -log(eps(FT))
k_x_max = k_peak + 2 * sqrt(n_efolds) / a
(Δu, Δv, Δw) =
2 * definite_integral(FT(0), k_x_max, 10000, 20) do k_x
2 * definite_integral(FT(0), k_x_max, 50000, 20) do k_x
_FT = typeof(k_x) # Redefine FT to prevent it from getting boxed.
Fh =
h_max * a / (8 * sqrt(_FT(π))) * (
Expand Down

0 comments on commit 5390243

Please sign in to comment.