Skip to content

Commit 0605cb9

Browse files
authoredFeb 6, 2025··
Merge pull request #3598 from CliMA/ck/NullBroadcasts
Use NullBroadcasts.jl
2 parents be9df9b + 4023c9c commit 0605cb9

File tree

8 files changed

+17
-107
lines changed

8 files changed

+17
-107
lines changed
 

‎.buildkite/Manifest-v1.11.toml

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
julia_version = "1.11.3"
44
manifest_format = "2.0"
5-
project_hash = "5a5d186c94863f5141fa0e695cac42b7f4ce95b2"
5+
project_hash = "d40c502ec857ceeea871b38bdda2ee519ea70240"
66

77
[[deps.ADTypes]]
88
git-tree-sha1 = "e1ce448a0d7f88168ffe2eeac4549c32d45a42d1"
@@ -347,7 +347,7 @@ version = "0.5.12"
347347
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
348348

349349
[[deps.ClimaAtmos]]
350-
deps = ["ArgParse", "Artifacts", "AtmosphericProfilesLibrary", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "CloudMicrophysics", "Dates", "DiffEqBase", "FastGaussQuadrature", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "RRTMGP", "Random", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "Thermodynamics", "UnrolledUtilities", "YAML"]
350+
deps = ["ArgParse", "Artifacts", "AtmosphericProfilesLibrary", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "CloudMicrophysics", "Dates", "DiffEqBase", "FastGaussQuadrature", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "NullBroadcasts", "RRTMGP", "Random", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "Thermodynamics", "UnrolledUtilities", "YAML"]
351351
path = ".."
352352
uuid = "b2c96348-7fb7-4fe0-8da9-78d88439e717"
353353
version = "0.28.4"
@@ -1702,6 +1702,11 @@ version = "1.1.1"
17021702
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
17031703
version = "1.2.0"
17041704

1705+
[[deps.NullBroadcasts]]
1706+
git-tree-sha1 = "343c7bb67d0a29ea5d7d2b3e945afe81e2862337"
1707+
uuid = "0d71be07-595a-4f89-9529-4065a4ab43a6"
1708+
version = "0.1.0"
1709+
17051710
[[deps.Observables]]
17061711
git-tree-sha1 = "7438a59546cf62428fc9d1bc94729146d37a7225"
17071712
uuid = "510215fc-4207-5dde-b226-833fc4488ee2"

‎.buildkite/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
2323
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
2424
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
2525
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
26+
NullBroadcasts = "0d71be07-595a-4f89-9529-4065a4ab43a6"
2627
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
2728
Poppler_jll = "9c32591e-4766-534b-9725-b71a8799265b"
2829
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"

‎Project.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2525
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
2626
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
2727
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
28+
NullBroadcasts = "0d71be07-595a-4f89-9529-4065a4ab43a6"
2829
RRTMGP = "a01a1ee8-cea4-48fc-987c-fc7878d79da1"
2930
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3031
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
@@ -51,11 +52,12 @@ DiffEqBase = "6.145"
5152
FastGaussQuadrature = "0.5, 1"
5253
Insolation = "0.9.2"
5354
Interpolations = "0.15.1"
54-
LazyBroadcast = "1"
5555
LazyArtifacts = "1"
56+
LazyBroadcast = "1"
5657
LinearAlgebra = "1"
5758
Logging = "1"
5859
NCDatasets = "0.14.2"
60+
NullBroadcasts = "0.1"
5961
NVTX = "0.3"
6062
RRTMGP = "0.19, 0.20"
6163
Random = "1"

‎src/ClimaAtmos.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
module ClimaAtmos
22

33
using NVTX
4-
import LazyBroadcast: @lazy
4+
import NullBroadcasts: NullBroadcasted
55
import LazyBroadcast
66
import LazyBroadcast: @lazy
77
import Thermodynamics as TD
88
import Thermodynamics
99

10-
include("null_broadcasted.jl")
1110
include("compat.jl")
1211
include(joinpath("parameters", "Parameters.jl"))
1312
import .Parameters as CAP

‎src/null_broadcasted.jl

-100
This file was deleted.

‎test/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2727
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
2828
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
2929
NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f"
30+
NullBroadcasts = "0d71be07-595a-4f89-9529-4065a4ab43a6"
3031
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
3132
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
3233
PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"

‎test/dependencies.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ known_dependencies = Set([
4646
"FastGaussQuadrature",
4747
"Insolation",
4848
"Interpolations",
49-
"LazyBroadcast",
49+
"LazyBroadcast", # for https://github.com/CliMA/ClimaAtmos.jl/issues/3594
5050
"LazyArtifacts",
5151
"LinearAlgebra",
5252
"Logging",
5353
# NCDatasets is used to read Earth topography, GCM driven initial conditions, orographic gravity wave data
54+
"NullBroadcasts", # works with LazyBroadcast
5455
"NCDatasets",
5556
"NVTX",
5657
"RRTMGP",

‎test/parameterized_tendencies/sponge/rayleigh_sponge.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using Revise; include("test/parameterized_tendencies/sponge/rayleigh_sponge.jl")
55
using ClimaComms
66
ClimaComms.@import_required_backends
77
import ClimaAtmos as CA
8+
using NullBroadcasts: NullBroadcasted
89
using ClimaCore.CommonSpaces
910
using ClimaCore: Spaces, Fields, Geometry, ClimaCore
1011
using Test
@@ -42,6 +43,6 @@ using ClimaCore.CommonSpaces
4243

4344
# Test when not using a Rayleigh sponge.
4445
computed = CA.rayleigh_sponge_tendency_uₕ(ᶜuₕ, nothing)
45-
@test computed isa CA.NullBroadcasted
46+
@test computed isa NullBroadcasted
4647
@. ᶜuₕ += computed # test that it can broadcast
4748
end

0 commit comments

Comments
 (0)
Please sign in to comment.