Skip to content

Commit

Permalink
Update init topography profile + config file
Browse files Browse the repository at this point in the history
	modified:   src/solver/type_getters.jl
	modified:   src/topography/topography.jl
+ Hughes2023 testcase + ci-plots
  • Loading branch information
akshaysridhar committed Apr 29, 2024
1 parent 87c7c6b commit 9cda4f1
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ steps:
julia --color=yes --project=examples examples/hybrid/driver.jl
--config_file $CONFIG_PATH/sphere_baroclinic_wave_rhoe_topography_dcmip_rs.yml
artifact_paths: "sphere_baroclinic_wave_rhoe_topography_dcmip_rs/output_active/*"

- label: ":computer: baroclinic wave (ρe) topography (hughes2023)"
command: >
julia --color=yes --project=examples examples/hybrid/driver.jl
--config_file $CONFIG_PATH/sphere_baroclinic_wave_rhoe_hughes2023.yml
artifact_paths: "sphere_baroclinic_wave_rhoe_hughes2023/output_active/*"


- label: ":computer: held suarez (ρe) topography (dcmip)"
command: >
Expand Down
13 changes: 13 additions & 0 deletions config/model_configs/sphere_baroclinic_wave_rhoe_hughes2023.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dt_save_state_to_disk: "2days"
initial_condition: "DryBaroclinicWave"
topography: "Hughes2023"
topo_smoothing: false
dt: "400secs"
t_end: "10days"
job_id: "sphere_baroclinic_wave_rhoe_hughes2023"
diagnostics:
- short_name: [pfull, wa, va, rv, ke]
period: 1days
- short_name: [pfull, wa, va, rv, ke]
period: 1days
writer: h5
1 change: 1 addition & 0 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ end

function make_plots(
::Val{:sphere_baroclinic_wave_rhoe_topography_dcmip_rs},
::Val{:sphere_baroclinic_wave_rhoe_hughes2023},
output_paths::Vector{<:AbstractString},
)
simdirs = SimDir.(output_paths)
Expand Down
5 changes: 4 additions & 1 deletion src/solver/type_getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ function get_spaces(parsed_args, params, comms_ctx)
bubble = parsed_args["bubble"]
deep = parsed_args["deep_atmosphere"]

@assert topography in ("NoWarp", "DCMIP200", "Earth", "Agnesi", "Schar")
@assert topography in
("NoWarp", "DCMIP200", "Earth", "Agnesi", "Schar", "Hughes2023")
if topography == "DCMIP200"
warp_function = topography_dcmip200
elseif topography == "Hughes2023"
warp_function = topography_hughes2023
elseif topography == "Agnesi"
warp_function = topography_agnesi
elseif topography == "Schar"
Expand Down
33 changes: 33 additions & 0 deletions src/topography/topography.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,39 @@ function topography_dcmip200(coords)
return zₛ
end

"""
topography_hughes2023(λ,ϕ)
λ = longitude (degrees)
ϕ = latitude (degrees)
Returns the surface elevation profile used in the baroclinic wave
test problem defined by Hughes and Jablonowski (2023).
"""
function topography_hughes2023(coords)
λ, ϕ = coords.long, coords.lat
FT = eltype(λ)
h₀ = FT(2e3)
# Angles in degrees
ϕ₁ = FT(45)
ϕ₂ = FT(45)
λ_min = minimum(λ)
λ₁ = FT(72)
λ₂ = FT(140)
λₘ = FT(7)
ϕₘ = FT(40)
d = ϕₘ / 2 * (-log(0.1))^(-1 / 6)
c = λₘ / 2 * (-log(0.1))^(-1 / 2)
d₁ = @.- λ_min) - λ₁
d₂ = @.- λ_min) - λ₂
l₁ = @. λ - λ₁
l₂ = @. λ - λ₂
zₛ = @. FT(
h₀ * (
exp(-(((ϕ - ϕ₁) / d)^6 + (l₁ / c)^2)) +
exp(-(((ϕ - ϕ₂) / d)^6 + (l₂ / c)^2))
),
)
end

function generate_topography_warp(earth_spline)
function topography_earth(coords)
λ, Φ = coords.long, coords.lat
Expand Down

0 comments on commit 9cda4f1

Please sign in to comment.