Skip to content

Commit 6d662df

Browse files
committed
more fixes
1 parent 6056b8b commit 6d662df

File tree

8 files changed

+171
-149
lines changed

8 files changed

+171
-149
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ ClimaAtmos.jl Release Notes
44
main
55
-------
66

7+
PR [#4021](https://github.com/CliMA/ClimaAtmos.jl/pull/4021) uses ClimaCore
8+
convenience constructors to create spaces without an AtmosConfig.
9+
710
v0.31.5
811
-------
912
PR [#3975](https://github.com/CliMA/ClimaAtmos.jl/pull/3975) updates the pressure gradient formulation to subtract a reference state and use the Exner pressure.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Artifacts = "1"
4545
AtmosphericProfilesLibrary = "0.1.7"
4646
ClimaComms = "0.6.9"
4747
ClimaCore = "0.14.43"
48-
ClimaDiagnostics = "0.2.12"
48+
ClimaDiagnostics = "0.2.13"
4949
ClimaInterpolations = "0.1.0"
5050
ClimaParams = "1.0.2"
5151
ClimaTimeSteppers = "0.8.2"

examples/topography_spectra.jl

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,52 +19,15 @@ using ClimaCore:
1919
using ClimaComms
2020
using ClimaUtilities: SpaceVaryingInputs.SpaceVaryingInput
2121

22+
# Include helper functions from test directory
23+
include(joinpath(@__DIR__, "..", "test", "test_helpers.jl"))
24+
2225
# h_elem is the number of elements per side of every panel (6 panels in total)
2326
function cubed_sphere_mesh(; radius, h_elem)
2427
domain = Domains.SphereDomain(radius)
2528
return Meshes.EquiangularCubedSphere(domain, h_elem)
2629
end
2730

28-
function make_horizontal_space(
29-
mesh,
30-
quad,
31-
comms_ctx::ClimaComms.SingletonCommsContext,
32-
bubble,
33-
)
34-
35-
space = if mesh isa Meshes.AbstractMesh1D
36-
topology = Topologies.IntervalTopology(comms_ctx, mesh)
37-
Spaces.SpectralElementSpace1D(topology, quad)
38-
elseif mesh isa Meshes.AbstractMesh2D
39-
topology = Topologies.Topology2D(
40-
comms_ctx,
41-
mesh,
42-
Topologies.spacefillingcurve(mesh),
43-
)
44-
Spaces.SpectralElementSpace2D(topology, quad; enable_bubble = bubble)
45-
end
46-
return space
47-
end
48-
49-
function make_horizontal_space(mesh, quad, comms_ctx, bubble)
50-
if mesh isa Meshes.AbstractMesh1D
51-
error("Distributed mode does not work with 1D horizontal spaces.")
52-
elseif mesh isa Meshes.AbstractMesh2D
53-
topology = Topologies.DistributedTopology2D(
54-
comms_ctx,
55-
mesh,
56-
Topologies.spacefillingcurve(mesh),
57-
)
58-
space = Spaces.SpectralElementSpace2D(
59-
topology,
60-
quad;
61-
enable_bubble = bubble,
62-
)
63-
end
64-
return space
65-
end
66-
67-
6831
"""
6932
generate_spaces(; h_elem=16)
7033
For a given number of elements `h_elem`, this function generates a

post_processing/ci_plots.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ function make_plots(
15661566

15671567
make_plots_generic(
15681568
output_paths,
1569-
vcat(var_groups_zt...),
1569+
vcat((var_groups_zt...)...),
15701570
plot_fn = plot_parsed_attribute_title!,
15711571
summary_files = [tmp_file],
15721572
MAX_NUM_COLS = 2,

src/diagnostics/default_diagnostics.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ function core_default_diagnostics(output_writer, duration, start_date; topograph
169169
min_func = (args...; kwargs...) -> hourly_min(FT, args...; kwargs...)
170170
max_func = (args...; kwargs...) -> hourly_max(FT, args...; kwargs...)
171171
end
172-
# Common diagnostics for all cases
173-
common_diagnostics = [
172+
# Base diagnostics for all cases
173+
base_diagnostics = [
174174
average_func(core_diagnostics...; output_writer, start_date)...,
175175
min_func("ts"; output_writer, start_date),
176176
max_func("ts"; output_writer, start_date),
@@ -185,10 +185,10 @@ function core_default_diagnostics(output_writer, duration, start_date; topograph
185185
output_writer,
186186
output_short_name = "orog_inst",
187187
)
188-
pushfirst!(common_diagnostics, orog_diagnostic)
188+
return [orog_diagnostic, base_diagnostics...]
189+
else
190+
return base_diagnostics
189191
end
190-
191-
return common_diagnostics
192192
end
193193

194194
##################

0 commit comments

Comments
 (0)