From a1fda62587ba25d71375e5c69239cc0a0fbb62ea Mon Sep 17 00:00:00 2001 From: kmdeck Date: Thu, 31 Aug 2023 13:52:18 -0700 Subject: [PATCH] removed method --- src/ClimaLSM.jl | 4 ---- src/shared_utilities/Domains.jl | 20 +++++++++++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/ClimaLSM.jl b/src/ClimaLSM.jl index 2c793b951d..809387dc04 100644 --- a/src/ClimaLSM.jl +++ b/src/ClimaLSM.jl @@ -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 diff --git a/src/shared_utilities/Domains.jl b/src/shared_utilities/Domains.jl index 1d9943a909..d5d4a5aaa3 100644 --- a/src/shared_utilities/Domains.jl +++ b/src/shared_utilities/Domains.jl @@ -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 @@ -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