diff --git a/src/solver/type_getters.jl b/src/solver/type_getters.jl index b267cb5d1d5..45144d6ccc4 100644 --- a/src/solver/type_getters.jl +++ b/src/solver/type_getters.jl @@ -199,26 +199,17 @@ function get_spaces(parsed_args, params, comms_ctx) elseif parsed_args["config"] == "column" # single column @warn "perturb_initstate flag is ignored for single column configuration" FT = eltype(params) - Δx = FT(1) # Note: This value shouldn't matter, since we only have 1 column. - quad = Quadratures.GL{1}() - horizontal_mesh = periodic_rectangle_mesh(; - x_max = Δx, - y_max = Δx, - x_elem = 1, - y_elem = 1, - ) - if bubble + quad = nothing + horizontal_mesh = nothing + bubble && @warn "Bubble correction not compatible with single column configuration. It will be switched off." - bubble = false - end - h_space = - make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble) z_stretch = if parsed_args["z_stretch"] Meshes.HyperbolicTangentStretching(dz_bottom) else Meshes.Uniform() end - make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args) + # make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args) + make_column_spaces(z_max, z_elem, z_stretch, comms_ctx) elseif parsed_args["config"] == "box" FT = eltype(params) nh_poly = parsed_args["nh_poly"] diff --git a/src/utils/common_spaces.jl b/src/utils/common_spaces.jl index 7feb5f38059..2a20b903e5a 100644 --- a/src/utils/common_spaces.jl +++ b/src/utils/common_spaces.jl @@ -56,6 +56,29 @@ function make_horizontal_space( return space end +function make_column_spaces( + z_max, + z_elem, + z_stretch, + comms_ctx::ClimaComms.SingletonCommsContext, +) + z_domain = Domains.IntervalDomain( + Geometry.ZPoint(zero(z_max)), + Geometry.ZPoint(z_max); + boundary_names = (:bottom, :top), + ) + z_mesh = Meshes.IntervalMesh(z_domain, z_stretch; nelems = z_elem) + @info "z heights" z_mesh.faces + device = ClimaComms.device(comms_ctx) + z_topology = Topologies.IntervalTopology( + ClimaComms.SingletonCommsContext(device), + z_mesh, + ) + cspace = Spaces.CenterFiniteDifferenceSpace(z_topology) + fspace = Spaces.CenterFiniteDifferenceSpace(cspace) + return (cspace, fspace) +end + function make_horizontal_space(mesh, quad, comms_ctx, bubble) if mesh isa Meshes.AbstractMesh1D error("Distributed mode does not work with 1D horizontal spaces.")