Skip to content

Commit 35bd11e

Browse files
author
Akshay Sridhar
committed
Fix stale cache args
modified: src/prognostic_equations/forcing/external_forcing.jl
1 parent 7940f37 commit 35bd11e

File tree

7 files changed

+67
-55
lines changed

7 files changed

+67
-55
lines changed

.buildkite/Manifest-v1.11.toml

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ version = "1.9.4"
211211
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
212212
version = "1.11.0"
213213

214+
[[deps.BaseDirs]]
215+
git-tree-sha1 = "03fea4a4efe25d2069c2d5685155005fc251c0a1"
216+
uuid = "18cc8868-cbac-4acf-b575-c8ff214dc66f"
217+
version = "1.3.0"
218+
214219
[[deps.BenchmarkTools]]
215220
deps = ["Compat", "JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"]
216221
git-tree-sha1 = "e38fbc49a620f5d0b660d7f543db1009fe0f8336"
@@ -281,9 +286,9 @@ version = "1.0.1+0"
281286

282287
[[deps.CUDA]]
283288
deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CUDA_Driver_jll", "CUDA_Runtime_Discovery", "CUDA_Runtime_jll", "Crayons", "DataFrames", "ExprTools", "GPUArrays", "GPUCompiler", "GPUToolbox", "KernelAbstractions", "LLVM", "LLVMLoopInfo", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "NVTX", "Preferences", "PrettyTables", "Printf", "Random", "Random123", "RandomNumbers", "Reexport", "Requires", "SparseArrays", "StaticArrays", "Statistics", "demumble_jll"]
284-
git-tree-sha1 = "bb1878ad25badd8e36e0f491ddf3fa5e3c7c34a5"
289+
git-tree-sha1 = "b8ae59258f3d96ce75a00f9229e719356eb929d6"
285290
uuid = "052768ef-5323-5732-b1bb-66c8b64840ba"
286-
version = "5.8.1"
291+
version = "5.8.2"
287292

288293
[deps.CUDA.extensions]
289294
ChainRulesCoreExt = "ChainRulesCore"
@@ -329,9 +334,9 @@ version = "0.12.18"
329334

330335
[[deps.Cairo_jll]]
331336
deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
332-
git-tree-sha1 = "2ac646d71d0d24b44f3f8c84da8c9f4d70fb67df"
337+
git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8"
333338
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
334-
version = "1.18.4+0"
339+
version = "1.18.5+0"
335340

336341
[[deps.ChainRulesCore]]
337342
deps = ["Compat", "LinearAlgebra"]
@@ -361,7 +366,7 @@ version = "0.5.17"
361366
deps = ["Adapt", "ArgParse", "Artifacts", "AtmosphericProfilesLibrary", "ClimaComms", "ClimaCore", "ClimaDiagnostics", "ClimaParams", "ClimaTimeSteppers", "ClimaUtilities", "CloudMicrophysics", "Dates", "Insolation", "Interpolations", "LazyArtifacts", "LazyBroadcast", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "NullBroadcasts", "RRTMGP", "Random", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "Thermodynamics", "UnrolledUtilities", "YAML"]
362367
path = ".."
363368
uuid = "b2c96348-7fb7-4fe0-8da9-78d88439e717"
364-
version = "0.30.2"
369+
version = "0.30.3"
365370

366371
[[deps.ClimaComms]]
367372
deps = ["Adapt", "Logging", "LoggingExtras"]
@@ -376,9 +381,9 @@ weakdeps = ["CUDA", "MPI"]
376381

377382
[[deps.ClimaCore]]
378383
deps = ["Adapt", "BandedMatrices", "BlockArrays", "ClimaComms", "CubedSphere", "DataStructures", "ForwardDiff", "GaussQuadrature", "GilbertCurves", "HDF5", "InteractiveUtils", "IntervalSets", "KrylovKit", "LazyBroadcast", "LinearAlgebra", "MultiBroadcastFusion", "NVTX", "PkgVersion", "RecursiveArrayTools", "RootSolvers", "SparseArrays", "StaticArrays", "Statistics", "UnrolledUtilities"]
379-
git-tree-sha1 = "cd1b32a3b8f3eab3e27e08180923a5c43c727f04"
384+
git-tree-sha1 = "c6ab151ea66f3756566abc039c76ae767e490446"
380385
uuid = "d414da3d-4745-48bb-8d80-42e94e092884"
381-
version = "0.14.33"
386+
version = "0.14.34"
382387
weakdeps = ["CUDA", "Krylov"]
383388

384389
[deps.ClimaCore.extensions]
@@ -494,9 +499,9 @@ weakdeps = ["SpecialFunctions"]
494499

495500
[[deps.Colors]]
496501
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
497-
git-tree-sha1 = "64e15186f0aa277e174aa81798f7eb8598e0157e"
502+
git-tree-sha1 = "37ea44092930b1811e666c3bc38065d7d87fcc74"
498503
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
499-
version = "0.13.0"
504+
version = "0.13.1"
500505

501506
[[deps.Combinatorics]]
502507
git-tree-sha1 = "8010b6bb3388abe68d95743dcbea77650bb2eddf"
@@ -628,9 +633,9 @@ version = "1.9.1"
628633

629634
[[deps.DiffEqBase]]
630635
deps = ["ArrayInterface", "ConcreteStructs", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "FastClosures", "FastPower", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SciMLStructures", "Setfield", "Static", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "TruncatedStacktraces"]
631-
git-tree-sha1 = "1bcd3a5c585c477e5d0595937ea7b5adcda6c621"
636+
git-tree-sha1 = "a0e5b5669df9465bc3dd32ea4a8ddeefbc0f7b5c"
632637
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
633-
version = "6.174.0"
638+
version = "6.175.0"
634639

635640
[deps.DiffEqBase.extensions]
636641
DiffEqBaseCUDAExt = "CUDA"
@@ -643,6 +648,7 @@ version = "6.174.0"
643648
DiffEqBaseMPIExt = "MPI"
644649
DiffEqBaseMeasurementsExt = "Measurements"
645650
DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements"
651+
DiffEqBaseMooncakeExt = "Mooncake"
646652
DiffEqBaseReverseDiffExt = "ReverseDiff"
647653
DiffEqBaseSparseArraysExt = "SparseArrays"
648654
DiffEqBaseTrackerExt = "Tracker"
@@ -659,6 +665,7 @@ version = "6.174.0"
659665
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
660666
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
661667
MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
668+
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
662669
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
663670
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
664671
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
@@ -725,9 +732,9 @@ uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56"
725732
version = "1.0.5"
726733

727734
[[deps.EnzymeCore]]
728-
git-tree-sha1 = "0cdb7af5c39e92d78a0ee8d0a447d32f7593137e"
735+
git-tree-sha1 = "1eb59f40a772d0fbd4cb75e00b3fa7f5f79c975a"
729736
uuid = "f151be2c-9106-41f4-ab19-57ee4f262869"
730-
version = "0.8.8"
737+
version = "0.8.9"
731738
weakdeps = ["Adapt"]
732739

733740
[deps.EnzymeCore.extensions]
@@ -901,10 +908,10 @@ uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7"
901908
version = "2.13.4+0"
902909

903910
[[deps.FreeTypeAbstraction]]
904-
deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"]
905-
git-tree-sha1 = "d52e255138ac21be31fa633200b65e4e71d26802"
911+
deps = ["BaseDirs", "ColorVectorSpace", "Colors", "FreeType", "GeometryBasics", "Mmap"]
912+
git-tree-sha1 = "eaca92bac73aa42f68c57d1b8df1b746eeb2bdaa"
906913
uuid = "663a7486-cb36-511b-a19d-713bb74d65c9"
907-
version = "0.10.6"
914+
version = "0.10.7"
908915

909916
[[deps.FriBidi_jll]]
910917
deps = ["Artifacts", "JLLWrappers", "Libdl"]
@@ -942,9 +949,9 @@ version = "0.2.0"
942949

943950
[[deps.GPUCompiler]]
944951
deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "PrecompileTools", "Preferences", "Scratch", "Serialization", "TOML", "Tracy", "UUIDs"]
945-
git-tree-sha1 = "3651909714fc4d5a005294d4781b2313ffc2913b"
952+
git-tree-sha1 = "fd1f587ca5dd2d52d990fbd9ff0dded736b51f1d"
946953
uuid = "61eb1bfa-7361-4325-ad38-22787b887f55"
947-
version = "1.5.0"
954+
version = "1.5.1"
948955

949956
[[deps.GPUToolbox]]
950957
git-tree-sha1 = "15d8b0f5a6dca9bf8c02eeaf6687660dafa638d0"
@@ -993,9 +1000,9 @@ version = "0.1.0"
9931000

9941001
[[deps.Glib_jll]]
9951002
deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"]
996-
git-tree-sha1 = "b0036b392358c80d2d2124746c2bf3d48d457938"
1003+
git-tree-sha1 = "fee60557e4f19d0fe5cd169211fdda80e494f4e8"
9971004
uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
998-
version = "2.82.4+0"
1005+
version = "2.84.0+0"
9991006

10001007
[[deps.Graphics]]
10011008
deps = ["Colors", "LinearAlgebra", "NaNMath"]
@@ -1044,9 +1051,9 @@ version = "1.14.2+1"
10441051

10451052
[[deps.HarfBuzz_jll]]
10461053
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"]
1047-
git-tree-sha1 = "55c53be97790242c29031e5cd45e8ac296dadda3"
1054+
git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813"
10481055
uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566"
1049-
version = "8.5.0+0"
1056+
version = "8.5.1+0"
10501057

10511058
[[deps.HashArrayMappedTries]]
10521059
git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae"
@@ -1449,10 +1456,10 @@ uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
14491456
version = "1.11.0"
14501457

14511458
[[deps.Libffi_jll]]
1452-
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
1453-
git-tree-sha1 = "27ecae93dd25ee0909666e6835051dd684cc035e"
1459+
deps = ["Artifacts", "JLLWrappers", "Libdl"]
1460+
git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a"
14541461
uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490"
1455-
version = "3.2.2+2"
1462+
version = "3.4.7+0"
14561463

14571464
[[deps.Libglvnd_jll]]
14581465
deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"]
@@ -1708,16 +1715,18 @@ version = "1.1.3"
17081715

17091716
[[deps.NaNStatistics]]
17101717
deps = ["PrecompileTools", "Static", "StaticArrayInterface"]
1711-
git-tree-sha1 = "3774db3e6da72b0112a3aea73e89f3a30411fa9e"
1718+
git-tree-sha1 = "1d1d52981acffb4d6c30ba64ff927f12d378796a"
17121719
uuid = "b946abbf-3ea7-4610-9019-9858bfdeaf2d"
1713-
version = "0.6.50"
1720+
version = "0.6.53"
17141721

17151722
[deps.NaNStatistics.extensions]
17161723
NaNStatisticsDimensionalDataExt = "DimensionalData"
1724+
NaNStatisticsHwlocExt = "Hwloc"
17171725
NaNStatisticsUnitfulExt = "Unitful"
17181726

17191727
[deps.NaNStatistics.weakdeps]
17201728
DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
1729+
Hwloc = "0e44f5e4-bd66-52a0-8798-143a42290a1d"
17211730
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
17221731

17231732
[[deps.NetCDF_jll]]
@@ -1867,9 +1876,9 @@ version = "0.5.12"
18671876

18681877
[[deps.Pango_jll]]
18691878
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "FriBidi_jll", "Glib_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl"]
1870-
git-tree-sha1 = "3b31172c032a1def20c98dae3f2cdc9d10e3b561"
1879+
git-tree-sha1 = "275a9a6d85dc86c24d03d1837a0010226a96f540"
18711880
uuid = "36c8627f-9965-5494-a995-c6b170f724f3"
1872-
version = "1.56.1+0"
1881+
version = "1.56.3+0"
18731882

18741883
[[deps.Parameters]]
18751884
deps = ["OrderedCollections", "UnPack"]
@@ -1912,9 +1921,9 @@ version = "1.4.3"
19121921

19131922
[[deps.Polyester]]
19141923
deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"]
1915-
git-tree-sha1 = "2082cc4be5e765bd982ed04ea06c068f4f702410"
1924+
git-tree-sha1 = "6f7cd22a802094d239824c57d94c8e2d0f7cfc7d"
19161925
uuid = "f517fe37-dbe3-4b94-8317-1923a5111588"
1917-
version = "0.7.17"
1926+
version = "0.7.18"
19181927

19191928
[[deps.PolyesterWeave]]
19201929
deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"]
@@ -2132,9 +2141,9 @@ version = "0.2.1"
21322141

21332142
[[deps.RuntimeGeneratedFunctions]]
21342143
deps = ["ExprTools", "SHA", "Serialization"]
2135-
git-tree-sha1 = "7cb9d10026d630ce2dd2a1fc6006a3d5041b34c0"
2144+
git-tree-sha1 = "86a8a8b783481e1ea6b9c91dd949cb32191f8ab4"
21362145
uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
2137-
version = "0.5.14"
2146+
version = "0.5.15"
21382147

21392148
[[deps.SHA]]
21402149
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
@@ -2153,9 +2162,9 @@ version = "0.1.0"
21532162

21542163
[[deps.SciMLBase]]
21552164
deps = ["ADTypes", "Accessors", "Adapt", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "Moshi", "PrecompileTools", "Preferences", "Printf", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "SciMLStructures", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface"]
2156-
git-tree-sha1 = "6d3c00e72dce943e4430e443bd0c531974618176"
2165+
git-tree-sha1 = "ce947672206f6a3a2bee1017c690cfd5fd82d897"
21572166
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
2158-
version = "2.93.0"
2167+
version = "2.96.0"
21592168

21602169
[deps.SciMLBase.extensions]
21612170
SciMLBaseChainRulesCoreExt = "ChainRulesCore"
@@ -2180,9 +2189,9 @@ version = "2.93.0"
21802189

21812190
[[deps.SciMLOperators]]
21822191
deps = ["Accessors", "ArrayInterface", "DocStringExtensions", "LinearAlgebra", "MacroTools"]
2183-
git-tree-sha1 = "6467d4e3eb86d9d7e31f43d01f9184409c0ea2be"
2192+
git-tree-sha1 = "85608e4aaf758547ffc4030c908318b432114ec9"
21842193
uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
2185-
version = "1.2.1"
2194+
version = "1.3.0"
21862195
weakdeps = ["SparseArrays", "StaticArraysCore"]
21872196

21882197
[deps.SciMLOperators.extensions]
@@ -2315,9 +2324,9 @@ version = "1.0.3"
23152324

23162325
[[deps.StackViews]]
23172326
deps = ["OffsetArrays"]
2318-
git-tree-sha1 = "46e589465204cd0c08b4bd97385e4fa79a0c770c"
2327+
git-tree-sha1 = "be1cf4eb0ac528d96f5115b4ed80c26a8d8ae621"
23192328
uuid = "cae243ae-269e-4f55-b966-ac2d0dc13c15"
2320-
version = "0.1.1"
2329+
version = "0.1.2"
23212330

23222331
[[deps.Static]]
23232332
deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools"]
@@ -2364,9 +2373,9 @@ weakdeps = ["SparseArrays"]
23642373

23652374
[[deps.StatsAPI]]
23662375
deps = ["LinearAlgebra"]
2367-
git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed"
2376+
git-tree-sha1 = "9d72a13a3f4dd3795a195ac5a44d7d6ff5f552ff"
23682377
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
2369-
version = "1.7.0"
2378+
version = "1.7.1"
23702379

23712380
[[deps.StatsBase]]
23722381
deps = ["AliasTables", "DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
@@ -2515,9 +2524,9 @@ weakdeps = ["ClimaParams"]
25152524

25162525
[[deps.ThreadingUtilities]]
25172526
deps = ["ManualMemory"]
2518-
git-tree-sha1 = "18ad3613e129312fe67789a71720c3747e598a61"
2527+
git-tree-sha1 = "2d529b6b22791f3e22e7ec5c60b9016e78f5f6bf"
25192528
uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5"
2520-
version = "0.5.3"
2529+
version = "0.5.4"
25212530

25222531
[[deps.TiffImages]]
25232532
deps = ["ColorTypes", "DataStructures", "DocStringExtensions", "FileIO", "FixedPointNumbers", "IndirectArrays", "Inflate", "Mmap", "OffsetArrays", "PkgVersion", "ProgressMeter", "SIMD", "UUIDs"]
@@ -2686,9 +2695,9 @@ version = "1.6.0+0"
26862695

26872696
[[deps.YAML]]
26882697
deps = ["Base64", "Dates", "Printf", "StringEncodings"]
2689-
git-tree-sha1 = "b46894beba6c05cd185d174654479aaec09ea6b1"
2698+
git-tree-sha1 = "2f58ac39f64b41fb812340347525be3b590cce3b"
26902699
uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
2691-
version = "0.4.13"
2700+
version = "0.4.14"
26922701

26932702
[[deps.Zlib_jll]]
26942703
deps = ["Libdl"]

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ ClimaAtmos.jl Release Notes
44
main
55
-------
66

7+
v0.30.3
8+
-------
9+
710
### Add diagnostic for CAPE
811
PR [#3820](https://github.com/CliMA/ClimaAtmos.jl/pull/3820) adds support for computing convective available potential energy (CAPE), or the vertical integral of the buoyancy differential between a parcel lifted from the surface and the environment. Exemplified in the TRMM deep convection case.
912

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClimaAtmos"
22
uuid = "b2c96348-7fb7-4fe0-8da9-78d88439e717"
33
authors = ["Climate Modeling Alliance"]
4-
version = "0.30.2"
4+
version = "0.30.3"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/cache/precomputed_quantities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ end
283283
function surface_velocity(ᶠu₃, ᶠuₕ³)
284284
sfc_u₃ = Fields.level(ᶠu₃.components.data.:1, half)
285285
sfc_uₕ³ = Fields.level(ᶠuₕ³.components.data.:1, half)
286-
sfc_g³³ = g³³_field(sfc_u₃)
286+
sfc_g³³ = g³³_field(axes(sfc_u₃))
287287
return @. lazy(-sfc_uₕ³ / sfc_g³³) # u³ = uₕ³ + w³ = uₕ³ + w₃ * g³³
288288
end
289289

src/prognostic_equations/forcing/external_forcing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ function external_forcing_cache(
378378
end
379379

380380
# ISDAC external forcing (i.e. nudging)
381-
external_forcing_cache(Y, external_forcing::ISDACForcing, params) = (;) # Don't need to cache anything
381+
external_forcing_cache(Y, external_forcing::ISDACForcing, params, _) = (;) # Don't need to cache anything
382382
function external_forcing_tendency!(Yₜ, Y, p, t, ::ISDACForcing)
383383
FT = Spaces.undertype(axes(Y.c))
384384
(; params) = p

src/utils/utilities.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ function compute_strain_rate_face(u::Fields.Field)
117117
end
118118

119119
"""
120-
g³³_field(field)
120+
g³³_field(space)
121121
122-
Extracts the value of `g³³` from `Fields.local_geometry_field(field)`.
122+
Extracts the value of `g³³`, the 3rd component of the metric terms that convert
123+
Covariant AxisTensors to Contravariant AxisTensors, from the given space.
123124
"""
124-
function g³³_field(field)
125-
g_field = Fields.local_geometry_field(field).gⁱʲ.components.data
125+
function g³³_field(space)
126+
g_field = Fields.local_geometry_field(space).gⁱʲ.components.data
126127
end_index = fieldcount(eltype(g_field)) # This will be 4 in 2D and 9 in 3D.
127128
return g_field.:($end_index) # For both 2D and 3D spaces, g³³ = g[end].
128129
end

test/utilities.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,8 @@ end
166166
(; cent_space, face_space) = get_cartesian_spaces()
167167
lg_gⁱʲ = cent_space.grid.center_local_geometry.gⁱʲ
168168
lg_g³³ = lg_gⁱʲ.components.data.:9
169-
@test Fields.field_values(
170-
CA.g³³_field(Fields.coordinate_field(cent_space).x),
171-
) == lg_g³³
169+
(; x) = Fields.coordinate_field(cent_space)
170+
@test Fields.field_values(CA.g³³_field(axes(x))) == lg_g³³
172171
@test maximum(abs.(lg_g³³ .- CA.g³³.(lg_gⁱʲ).components.data.:1)) == 0
173172
@test maximum(abs.(CA.g³ʰ.(lg_gⁱʲ).components.data.:1)) == 0
174173
@test maximum(abs.(CA.g³ʰ.(lg_gⁱʲ).components.data.:2)) == 0

0 commit comments

Comments
 (0)