Skip to content

Commit

Permalink
fix ClimaCore deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Feb 9, 2024
1 parent 0122d57 commit cb8d4e4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Regridder.jl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function hdwrite_regridfile_rll_to_cgll(
space2d_undistributed = Spaces.SpectralElementSpace2D(topology, Spaces.Quadratures.GLL{Nq}())

if space isa Spaces.ExtrudedFiniteDifferenceSpace
vert_center_space = Spaces.CenterFiniteDifferenceSpace(space.vertical_topology.mesh)
vert_center_space = Spaces.CenterFiniteDifferenceSpace(Spaces.vertical_topology(space).mesh)
space_undistributed = Spaces.ExtrudedFiniteDifferenceSpace(space2d_undistributed, vert_center_space)
else
space_undistributed = space2d_undistributed
Expand Down
2 changes: 1 addition & 1 deletion test/TestHelper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function create_space(
mesh = Meshes.EquiangularCubedSphere(domain, ne)

if comms_ctx isa ClimaComms.SingletonCommsContext
topology = Topologies.Topology2D(mesh, Topologies.spacefillingcurve(mesh))
topology = Topologies.Topology2D(comms_ctx, mesh, Topologies.spacefillingcurve(mesh))
else
topology = Topologies.DistributedTopology2D(comms_ctx, mesh, Topologies.spacefillingcurve(mesh))
end
Expand Down
4 changes: 2 additions & 2 deletions test/bcreader_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ for FT in (Float32, Float64)
Nq = 4
domain = Domains.SphereDomain(radius)
mesh = Meshes.EquiangularCubedSphere(domain, 4)
topology = Topologies.Topology2D(mesh)
topology = Topologies.Topology2D(comms_ctx, mesh)
quad = Spaces.Quadratures.GLL{Nq}()
boundary_space_t = Spaces.SpectralElementSpace2D(topology, quad)
monthly_fields = (zeros(boundary_space_t), ones(boundary_space_t))
Expand Down Expand Up @@ -349,7 +349,7 @@ for FT in (Float32, Float64)
Nq = 4
domain = Domains.SphereDomain(radius)
mesh = Meshes.EquiangularCubedSphere(domain, 4)
topology = Topologies.Topology2D(mesh)
topology = Topologies.Topology2D(comms_ctx, mesh)
quad = Spaces.Quadratures.GLL{Nq}()
boundary_space_t = Spaces.SpectralElementSpace2D(topology, quad)
land_fraction_t = Fields.zeros(boundary_space_t)
Expand Down
4 changes: 3 additions & 1 deletion test/experiment_tests/coupled_sims.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using Random
using ClimaCoupler, Dates, Unitful
using IntervalSets
using ClimaCore: Domains, Meshes, Geometry, Topologies, Spaces, Fields, Operators
using ClimaComms

# Load file to test
include("../../experiments/ClimaCore/CoupledSims/coupled_sim.jl")
Expand Down Expand Up @@ -40,7 +41,8 @@ function spectral_space_2D(; n1 = 1, n2 = 1, Nij = 4)
x2boundary = (:south, :north),
)
mesh = Meshes.RectilinearMesh(domain, n1, n2)
grid_topology = Topologies.Topology2D(mesh)
comms_ctx = ClimaComms.SingletonCommsContext()
grid_topology = Topologies.Topology2D(comms_ctx, mesh)

quad = Spaces.Quadratures.GLL{Nij}()
space = Spaces.SpectralElementSpace2D(grid_topology, quad)
Expand Down

0 comments on commit cb8d4e4

Please sign in to comment.