Skip to content

Commit

Permalink
removed method
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdeck committed Aug 31, 2023
1 parent 26b935e commit a1fda62
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/ClimaLSM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ using DocStringExtensions

using ClimaCore
import ClimaCore: Fields, Spaces
# Temporary fix
import ClimaComms
ClimaCore.Spaces.PointSpace(x) =
ClimaCore.Spaces.PointSpace(ClimaComms.SingletonCommsContext(), x)

include("shared_utilities/Parameters.jl")
import .Parameters as LSMP
Expand Down
20 changes: 17 additions & 3 deletions src/shared_utilities/Domains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### the models.jl code as well. But LSM domains will live in ClimaLSM.
module Domains
using ClimaCore
using ClimaComms
using IntervalSets
using DocStringExtensions

Expand Down Expand Up @@ -40,12 +41,25 @@ struct Point{FT, S} <: AbstractDomain{FT}
end

"""
Point(;z_sfc::FT) where {FT}
Point(;z_sfc::FT,
comms = ClimaComms.SingletonCommsContext()
) where {FT}
Constructor for the `Point` domain using keyword arguments.
All other ClimaLSM domains rely on default comms set internally
by ClimaCore. However, the Point space is unique in this context,
and does not have the same default defined in ClimaCore.
Because of this, we set the default here
in ClimaLSM. In long term, we will repeat the same for all ClimaLSM domains
and not rely on any internal defaults set in ClimaCore.
"""
function Point(; z_sfc::FT) where {FT}
function Point(;
z_sfc::FT,
comms = ClimaComms.SingletonCommsContext(),
) where {FT}
coord = ClimaCore.Geometry.ZPoint(z_sfc)
space = ClimaCore.Spaces.PointSpace(coord)
space = ClimaCore.Spaces.PointSpace(comms, coord)
return Point{FT, typeof(space)}(z_sfc, space)
end

Expand Down

0 comments on commit a1fda62

Please sign in to comment.