From 42db3dacfdc9eda07778a19432b8e87cb12585b5 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 11 Nov 2025 17:04:30 -0800 Subject: [PATCH 01/18] Remove ClimaOcean due to compatibility issues --- experiments/ClimaEarth/Manifest-v1.11.toml | 166 +-------------------- experiments/ClimaEarth/Project.toml | 4 +- experiments/ClimaEarth/setup_run.jl | 2 +- 3 files changed, 7 insertions(+), 165 deletions(-) diff --git a/experiments/ClimaEarth/Manifest-v1.11.toml b/experiments/ClimaEarth/Manifest-v1.11.toml index 9c54dad75c..c94a529b01 100644 --- a/experiments/ClimaEarth/Manifest-v1.11.toml +++ b/experiments/ClimaEarth/Manifest-v1.11.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.11.6" +julia_version = "1.11.5" manifest_format = "2.0" -project_hash = "bf902fbe4cdfe69d6bdc0c99b12a9c00c5aa28ee" +project_hash = "335e1581853b8017ddac2e99475e998831d05cf3" [[deps.ADTypes]] git-tree-sha1 = "27cecae79e5cc9935255f90c53bb831cc3c870d7" @@ -242,11 +242,6 @@ git-tree-sha1 = "7fecfb1123b8d0232218e2da0c213004ff15358d" uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" version = "1.6.3" -[[deps.BitFlags]] -git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d" -uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" -version = "0.1.9" - [[deps.BitTwiddlingConvenienceFunctions]] deps = ["Static"] git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" @@ -369,12 +364,6 @@ git-tree-sha1 = "fde3bf89aead2e723284a8ff9cdf5b551ed700e8" uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" version = "1.18.5+0" -[[deps.CatViews]] -deps = ["Random", "Test"] -git-tree-sha1 = "23d1f1e10d4e24374112fcf800ac981d14a54b24" -uuid = "81a5f4ea-a946-549a-aa7e-2a7f63a27d31" -version = "1.0.0" - [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] git-tree-sha1 = "e4c6a16e77171a5f5e25e9646617ab1c276c5607" @@ -510,20 +499,6 @@ version = "1.0.1" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -[[deps.ClimaOcean]] -deps = ["Adapt", "CFTime", "CUDA", "ClimaSeaIce", "CubicSplines", "DataDeps", "Dates", "DocStringExtensions", "Downloads", "Glob", "ImageMorphology", "JLD2", "KernelAbstractions", "MPI", "MeshArrays", "NCDatasets", "Oceananigans", "OffsetArrays", "PrecompileTools", "Printf", "Scratch", "SeawaterPolynomials", "StaticArrays", "Statistics", "Thermodynamics", "ZipFile"] -git-tree-sha1 = "440f1dfbc96bfb04ca2b9ec615a2ef3f3d0bd77b" -uuid = "0376089a-ecfe-4b0e-a64f-9c555d74d754" -version = "0.8.7" - - [deps.ClimaOcean.extensions] - ClimaOceanCopernicusMarineExt = "CopernicusMarine" - ClimaOceanReactantExt = "Reactant" - - [deps.ClimaOcean.weakdeps] - CopernicusMarine = "cd43e856-93a3-40c8-bc9e-6146cdce14fa" - Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" - [[deps.ClimaParams]] deps = ["Dates", "TOML"] git-tree-sha1 = "995991392b8bf4c8400b38ba5bcb7d3a0e7d9cce" @@ -683,12 +658,6 @@ git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" version = "0.2.3" -[[deps.ConcurrentUtilities]] -deps = ["Serialization", "Sockets"] -git-tree-sha1 = "d9d26935a0bcffc87d2613ce14c527c99fc543fd" -uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" -version = "2.5.0" - [[deps.ConstructionBase]] git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" @@ -734,23 +703,11 @@ git-tree-sha1 = "6ffea589cf350b1582722e57a8de787907d59454" uuid = "7445602f-e544-4518-8976-18f8e8ae6cdb" version = "0.3.4" -[[deps.CubicSplines]] -deps = ["Random", "Test"] -git-tree-sha1 = "4875023d456ea37c581f406b8b1bc35bea95ae67" -uuid = "9c784101-8907-5a6d-9be6-98f00873c89b" -version = "0.2.1" - [[deps.DataAPI]] git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" version = "1.16.0" -[[deps.DataDeps]] -deps = ["HTTP", "Libdl", "Reexport", "SHA", "Scratch", "p7zip_jll"] -git-tree-sha1 = "8ae085b71c462c2cb1cfedcb10c3c877ec6cf03f" -uuid = "124859b0-ceae-595e-8997-d05f6a7a8dfe" -version = "0.7.13" - [[deps.DataFrames]] deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] git-tree-sha1 = "d8928e9169ff76c6281f39a659f9bca3a573f24c" @@ -971,12 +928,6 @@ git-tree-sha1 = "83231673ea4d3d6008ac74dc5079e77ab2209d8f" uuid = "429591f6-91af-11e9-00e2-59fbe8cec110" version = "2.2.9" -[[deps.ExceptionUnwrapping]] -deps = ["Test"] -git-tree-sha1 = "d36f682e590a83d63d1c7dbd287573764682d12a" -uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" -version = "0.1.11" - [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "27af30de8b5445644e8ffe3bcb0d72049c089cf1" @@ -1072,11 +1023,13 @@ deps = ["Pkg", "Requires", "UUIDs"] git-tree-sha1 = "d60eb76f37d7e5a40cc2e7c36974d864b82dc802" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" version = "1.17.1" -weakdeps = ["HTTP"] [deps.FileIO.extensions] HTTPExt = "HTTP" + [deps.FileIO.weakdeps] + HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" + [[deps.FilePaths]] deps = ["FilePathsBase", "MacroTools", "Reexport", "Requires"] git-tree-sha1 = "919d9412dbf53a2e6fe74af62a73ceed0bce0629" @@ -1385,12 +1338,6 @@ git-tree-sha1 = "e94f84da9af7ce9c6be049e9067e511e17ff89ec" uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" version = "1.14.6+0" -[[deps.HTTP]] -deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "PrecompileTools", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] -git-tree-sha1 = "5e6fe50ae7f23d171f44e311c2960294aaa0beb5" -uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" -version = "1.10.19" - [[deps.HarfBuzz_jll]] deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll"] git-tree-sha1 = "f923f9a774fcf3f5cb761bfa43aeadd689714813" @@ -1402,12 +1349,6 @@ git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" version = "0.2.0" -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "8e070b599339d622e9a081d17230d74a5c473293" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.17" - [[deps.Hwloc_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "XML2_jll", "Xorg_libpciaccess_jll"] git-tree-sha1 = "3d468106a05408f9f7b6f161d9e7715159af247b" @@ -1455,12 +1396,6 @@ git-tree-sha1 = "2a81c3897be6fbcde0802a0ebe6796d0562f63ec" uuid = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" version = "0.9.10" -[[deps.ImageMorphology]] -deps = ["DataStructures", "ImageCore", "LinearAlgebra", "LoopVectorization", "OffsetArrays", "Requires", "TiledIteration"] -git-tree-sha1 = "cffa21df12f00ca1a365eb8ed107614b40e8c6da" -uuid = "787d08f9-d448-5407-9aad-5290dd7ab264" -version = "0.4.6" - [[deps.Imath_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "0936ba688c6d201805a83da835b55c61a180db52" @@ -1928,23 +1863,6 @@ git-tree-sha1 = "f00544d95982ea270145636c181ceda21c4e2575" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" version = "1.2.0" -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "a9fc7883eb9b5f04f46efb9a540833d1fad974b3" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.173" - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - ForwardDiffNNlibExt = ["ForwardDiff", "NNlib"] - SpecialFunctionsExt = "SpecialFunctions" - - [deps.LoopVectorization.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" - [[deps.Lz4_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "191686b1ac1ea9c89fc52e996ad15d1d241d1e33" @@ -2039,39 +1957,11 @@ git-tree-sha1 = "7eb8cdaa6f0e8081616367c10b31b9d9b34bb02a" uuid = "0a4f8689-d25c-4efe-a92b-7142dfc1aa53" version = "0.6.7" -[[deps.MbedTLS]] -deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] -git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" -uuid = "739be429-bea8-5141-9913-cc70e7f3736d" -version = "1.1.9" - [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" version = "2.28.6+0" -[[deps.MeshArrays]] -deps = ["CatViews", "Dates", "Distributed", "Glob", "LazyArtifacts", "NearestNeighbors", "Pkg", "Printf", "SharedArrays", "SparseArrays", "Statistics", "Unitful"] -git-tree-sha1 = "fea0859c1406389b3e6657b5376b577ffffdd03a" -uuid = "cb8c808f-1acf-59a3-9d2b-6e38d009f683" -version = "0.3.23" - - [deps.MeshArrays.extensions] - MeshArraysDataDepsExt = ["DataDeps"] - MeshArraysGeoJSONExt = ["GeoJSON"] - MeshArraysJLD2Ext = ["JLD2"] - MeshArraysMakieExt = ["Makie"] - MeshArraysProjExt = ["Proj"] - MeshArraysShapefileExt = ["Shapefile"] - - [deps.MeshArrays.weakdeps] - DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe" - GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9" - JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" - Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" - Proj = "c94c279d-25a6-4763-9509-64d165bea63e" - Shapefile = "8e980c4a-a4fe-5da2-b3a7-4b4b0353a2f4" - [[deps.Metis]] deps = ["CEnum", "LinearAlgebra", "METIS_jll", "SparseArrays"] git-tree-sha1 = "54aca4fd53d39dcd2c3f1bef367b6921e8178628" @@ -2196,12 +2086,6 @@ git-tree-sha1 = "3f75210ac08fe4496a55f9694b95859c40b8eaea" uuid = "436b0209-26ab-4e65-94a9-6526d86fea76" version = "0.1.0" -[[deps.NearestNeighbors]] -deps = ["Distances", "StaticArrays"] -git-tree-sha1 = "ca7e18198a166a1f3eb92a3650d53d94ed8ca8a1" -uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" -version = "0.4.22" - [[deps.NetCDF_jll]] deps = ["Artifacts", "Blosc_jll", "Bzip2_jll", "HDF5_jll", "JLLWrappers", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "TOML", "XML2_jll", "Zlib_jll", "Zstd_jll", "libaec_jll", "libzip_jll"] git-tree-sha1 = "d574803b6055116af212434460adf654ce98e345" @@ -2319,12 +2203,6 @@ git-tree-sha1 = "ec764453819f802fc1e144bfe750c454181bd66d" uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" version = "5.0.8+0" -[[deps.OpenSSL]] -deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "NetworkOptions", "OpenSSL_jll", "Sockets"] -git-tree-sha1 = "386b47442468acfb1add94bf2d85365dea10cbab" -uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" -version = "1.6.0" - [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "f19301ae653233bc88b1810ae908194f07f8db9d" @@ -2777,12 +2655,6 @@ git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "456f610ca2fbd1c14f5fcf31c6bfadc55e7d66e0" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.43" - [[deps.SQLite_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] git-tree-sha1 = "9a325057cdb9b066f1f96dc77218df60fe3007cb" @@ -2912,11 +2784,6 @@ git-tree-sha1 = "d263a08ec505853a5ff1c1ebde2070419e3f28e9" uuid = "73760f76-fbc4-59ce-8f25-708e95d2df96" version = "0.4.0" -[[deps.SimpleBufferStream]] -git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1" -uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" -version = "1.2.0" - [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "be8eeac05ec97d379347584fa9fe2f5f76795bcb" @@ -3226,12 +3093,6 @@ git-tree-sha1 = "98b9352a24cb6a2066f9ababcc6802de9aed8ad8" uuid = "731e570b-9d59-4bfa-96dc-6df516fadf69" version = "0.11.6" -[[deps.TiledIteration]] -deps = ["OffsetArrays", "StaticArrayInterface"] -git-tree-sha1 = "1176cc31e867217b06928e2f140c90bd1bc88283" -uuid = "06e1c1a7-607b-532d-9fad-de7d9aa2abac" -version = "0.5.0" - [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] git-tree-sha1 = "3748bd928e68c7c346b52125cf41fff0de6937d0" @@ -3272,11 +3133,6 @@ git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" uuid = "781d530d-4396-4725-bb49-402e4bee1e77" version = "1.4.0" -[[deps.URIs]] -git-tree-sha1 = "bef26fb046d031353ef97a82e3fdb6afe7f21b1a" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.6.1" - [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" @@ -3342,12 +3198,6 @@ git-tree-sha1 = "cea8abaa6e43f72f97a09cf95b80c9eb53ff75cf" uuid = "409d34a3-91d5-4945-b6ec-7529ddf182d8" version = "0.4.9" -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "d1d9a935a26c475ebffd54e9c7ad11627c43ea85" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.72" - [[deps.WebP]] deps = ["CEnum", "ColorTypes", "FileIO", "FixedPointNumbers", "ImageCore", "libwebp_jll"] git-tree-sha1 = "aa1ca3c47f119fbdae8770c29820e5e6119b83f2" @@ -3426,12 +3276,6 @@ git-tree-sha1 = "ed87adf5041ca93203093b03e0d78b6a9d987290" uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" version = "0.4.15" -[[deps.ZipFile]] -deps = ["Libdl", "Printf", "Zlib_jll"] -git-tree-sha1 = "f492b7fe1698e623024e873244f10d89c95c340a" -uuid = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" -version = "0.10.1" - [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" diff --git a/experiments/ClimaEarth/Project.toml b/experiments/ClimaEarth/Project.toml index ff292ea7e6..ecb32a0051 100644 --- a/experiments/ClimaEarth/Project.toml +++ b/experiments/ClimaEarth/Project.toml @@ -11,7 +11,6 @@ ClimaCoreMakie = "908f55d8-4145-4867-9c14-5dad1a479e4d" ClimaCoupler = "4ade58fe-a8da-486c-bd89-46df092ec0c7" ClimaDiagnostics = "1ecacbb8-0713-4841-9a07-eb5aa8a2d53f" ClimaLand = "08f4d4ce-cf43-44bb-ad95-9d2d5f413532" -ClimaOcean = "0376089a-ecfe-4b0e-a64f-9c555d74d754" ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c" ClimaSeaIce = "6ba0ff68-24e6-4315-936c-2e99227c95a4" ClimaTimeSteppers = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" @@ -36,17 +35,16 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" [compat] ArgParse = "1.1" +CUDA = "5" ClimaAnalysis = "0.5.10" ClimaAtmos = "0.27, 0.28, 0.29, 0.30, 0.31" ClimaCalibrate = "0.1" ClimaDiagnostics = "0.2.6" ClimaLand = "1.0" -ClimaOcean = "0.8" ClimaParams = "1.0" ClimaSeaIce = "0.3" ClimaTimeSteppers = "0.7, 0.8" ClimaUtilities = "0.1" -CUDA = "5" EnsembleKalmanProcesses = "2" Insolation = "0.10.2" Interpolations = "0.14, 0.15" diff --git a/experiments/ClimaEarth/setup_run.jl b/experiments/ClimaEarth/setup_run.jl index faf2d6fb5f..b9f95a5067 100644 --- a/experiments/ClimaEarth/setup_run.jl +++ b/experiments/ClimaEarth/setup_run.jl @@ -77,7 +77,7 @@ include("components/land/climaland_integrated.jl") include("components/ocean/slab_ocean.jl") include("components/ocean/prescr_ocean.jl") include("components/ocean/prescr_seaice.jl") -include("components/ocean/oceananigans.jl") +# include("components/ocean/oceananigans.jl") #= ### Configuration Dictionaries From b3fa1d1eac6dda50a4088ea3915a372392b5b94e Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 11 Nov 2025 21:08:24 -0800 Subject: [PATCH 02/18] Update ClimaCore --- experiments/ClimaEarth/Manifest-v1.11.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/experiments/ClimaEarth/Manifest-v1.11.toml b/experiments/ClimaEarth/Manifest-v1.11.toml index c94a529b01..36cf16bc33 100644 --- a/experiments/ClimaEarth/Manifest-v1.11.toml +++ b/experiments/ClimaEarth/Manifest-v1.11.toml @@ -438,7 +438,9 @@ weakdeps = ["CUDA", "MPI"] [[deps.ClimaCore]] 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"] -git-tree-sha1 = "344711aa776e0bbd007ad127e5ba9f2113a1c88b" +git-tree-sha1 = "8f848bf337b790a5d559ffc34d182ccfde350c25" +repo-rev = "main" +repo-url = "https://github.com/CliMA/ClimaCore.jl" uuid = "d414da3d-4745-48bb-8d80-42e94e092884" version = "0.14.41" weakdeps = ["CUDA", "Krylov"] From e5e30ff4db93df5e315c229b9896b8cbf8fbaa24 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 10:44:16 -0800 Subject: [PATCH 03/18] Check if spaces are compatible to avoid unnecessary remapping --- .../components/land/climaland_integrated.jl | 139 +++++++++++++----- 1 file changed, 102 insertions(+), 37 deletions(-) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index 193571a08c..16aa52769f 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -550,6 +550,13 @@ function FluxCalculator.compute_surface_fluxes!( land_space = axes(p.soil.turbulent_fluxes) coupled_atmos = sim.model.soil.boundary_conditions.top.atmos + # Check if spaces are compatible to avoid unnecessary remapping + spaces_compatible = ( + land_space == boundary_space || + CC.Spaces.issubspace(land_space, boundary_space) || + CC.Spaces.issubspace(boundary_space, land_space) + ) + # Update the land simulation's coupled atmosphere state Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) @@ -559,9 +566,18 @@ function FluxCalculator.compute_surface_fluxes!( @. coupled_atmos.u = StaticArrays.SVector(p.scratch1, p.scratch2) # Use scratch space for remapped atmospheric fields to avoid allocations - Interfacer.remap!(p.scratch1, csf.ρ_atmos) - Interfacer.remap!(p.scratch2, csf.T_atmos) - Interfacer.remap!(p.scratch3, csf.q_atmos) + # Optimize atmospheric field remapping based on space compatibility + if spaces_compatible + # Direct assignment - no remapping needed, avoids device-to-host memory copies + @. p.scratch1 = csf.ρ_atmos + @. p.scratch2 = csf.T_atmos + @. p.scratch3 = csf.q_atmos + else + # Remap when spaces differ + Interfacer.remap!(p.scratch1, csf.ρ_atmos) + Interfacer.remap!(p.scratch2, csf.T_atmos) + Interfacer.remap!(p.scratch3, csf.q_atmos) + end @. coupled_atmos.thermal_state = TD.PhaseEquil_ρTq(thermo_params, p.scratch1, p.scratch2, p.scratch3) @@ -586,16 +602,29 @@ function FluxCalculator.compute_surface_fluxes!( # Combine turbulent energy fluxes from each component of the land model # Use temporary variables to avoid allocating - Interfacer.remap!( - csf.scalar_temp1, - canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.lhf, - ) - Interfacer.remap!( - csf.scalar_temp2, - canopy_dest.shf .+ soil_dest.shf .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.shf, - ) + if spaces_compatible + # Direct assignment - no remapping needed + @. csf.scalar_temp1 = + canopy_dest.lhf + + soil_dest.lhf * (1 - p.snow.snow_cover_fraction) + + p.snow.snow_cover_fraction * snow_dest.lhf + @. csf.scalar_temp2 = + canopy_dest.shf + + soil_dest.shf * (1 - p.snow.snow_cover_fraction) + + p.snow.snow_cover_fraction * snow_dest.shf + else + # Remap when spaces differ + Interfacer.remap!( + csf.scalar_temp1, + canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.lhf, + ) + Interfacer.remap!( + csf.scalar_temp2, + canopy_dest.shf .+ soil_dest.shf .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.shf, + ) + end # Zero out the fluxes where the area fraction is zero @. csf.scalar_temp1 = @@ -610,15 +639,27 @@ function FluxCalculator.compute_surface_fluxes!( # Combine turbulent moisture fluxes from each component of the land model # Note that we multiply by ρ_liq to convert from m s-1 to kg m-2 s-1 ρ_liq = (LP.ρ_cloud_liq(sim.model.soil.parameters.earth_param_set)) - Interfacer.remap!( - csf.scalar_temp1, - ( - canopy_dest.transpiration .+ - (soil_dest.vapor_flux_liq .+ soil_dest.vapor_flux_ice) .* - (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.vapor_flux - ) .* ρ_liq, - ) + if spaces_compatible + # Direct assignment - no remapping needed + @. csf.scalar_temp1 = + ( + canopy_dest.transpiration + + (soil_dest.vapor_flux_liq + soil_dest.vapor_flux_ice) * + (1 - p.snow.snow_cover_fraction) + + p.snow.snow_cover_fraction * snow_dest.vapor_flux + ) * ρ_liq + else + # Remap when spaces differ + Interfacer.remap!( + csf.scalar_temp1, + ( + canopy_dest.transpiration .+ + (soil_dest.vapor_flux_liq .+ soil_dest.vapor_flux_ice) .* + (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.vapor_flux + ) .* ρ_liq, + ) + end @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.F_turb_moisture += csf.scalar_temp1 * area_fraction @@ -626,20 +667,36 @@ function FluxCalculator.compute_surface_fluxes!( # Combine turbulent momentum fluxes from each component of the land model # Note that we exclude the canopy component here for now, since we can have nonzero momentum fluxes # where there is zero LAI. This should be fixed in ClimaLand. - Interfacer.remap!( - csf.scalar_temp1, - soil_dest.ρτxz .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.ρτxz, - ) + if spaces_compatible + # Direct assignment - no remapping needed + @. csf.scalar_temp1 = + soil_dest.ρτxz * (1 - p.snow.snow_cover_fraction) + + p.snow.snow_cover_fraction * snow_dest.ρτxz + else + # Remap when spaces differ + Interfacer.remap!( + csf.scalar_temp1, + soil_dest.ρτxz .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.ρτxz, + ) + end @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.F_turb_ρτxz += csf.scalar_temp1 * area_fraction - Interfacer.remap!( - csf.scalar_temp1, - soil_dest.ρτyz .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.ρτyz, - ) + if spaces_compatible + # Direct assignment - no remapping needed + @. csf.scalar_temp1 = + soil_dest.ρτyz * (1 - p.snow.snow_cover_fraction) + + p.snow.snow_cover_fraction * snow_dest.ρτyz + else + # Remap when spaces differ + Interfacer.remap!( + csf.scalar_temp1, + soil_dest.ρτyz .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.ρτyz, + ) + end @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.F_turb_ρτyz += csf.scalar_temp1 * area_fraction @@ -647,11 +704,19 @@ function FluxCalculator.compute_surface_fluxes!( # Combine the buoyancy flux from each component of the land model # Note that we exclude the canopy component here for now, since ClimaLand doesn't # include its extra resistance term in the buoyancy flux calculation. - Interfacer.remap!( - csf.scalar_temp1, - soil_dest.buoy_flux .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.buoy_flux, - ) + if spaces_compatible + # Direct assignment - no remapping needed + @. csf.scalar_temp1 = + soil_dest.buoy_flux * (1 - p.snow.snow_cover_fraction) + + p.snow.snow_cover_fraction * snow_dest.buoy_flux + else + # Remap when spaces differ + Interfacer.remap!( + csf.scalar_temp1, + soil_dest.buoy_flux .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.buoy_flux, + ) + end @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.buoyancy_flux += csf.scalar_temp1 * area_fraction From be59a352213b8d630e8abc688541b43a13c8db42 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 11:33:36 -0800 Subject: [PATCH 04/18] Update buildkite to use ClimaCore from GitHub --- .buildkite/pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 44ffe26df0..9ae9228d60 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -32,6 +32,7 @@ steps: - "julia --project -e 'using Pkg; Pkg.status()'" - echo "--- Instantiate ClimaEarth experiments env" + - julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.add(Pkg.PackageSpec(;name="ClimaCore", rev="main"))' - "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.develop(path=\".\")'" - "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.instantiate(;verbose=true)'" - "julia --project=experiments/ClimaEarth/ -e 'using Pkg; Pkg.add(\"MPI\")'" From 93e5d15b752352f6f66c7946699d46b81564c4c0 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 11:52:07 -0800 Subject: [PATCH 05/18] Try different approach --- .../components/land/climaland_integrated.jl | 136 ++++++------------ 1 file changed, 42 insertions(+), 94 deletions(-) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index 16aa52769f..0a0a6ca1ed 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -550,12 +550,11 @@ function FluxCalculator.compute_surface_fluxes!( land_space = axes(p.soil.turbulent_fluxes) coupled_atmos = sim.model.soil.boundary_conditions.top.atmos - # Check if spaces are compatible to avoid unnecessary remapping - spaces_compatible = ( - land_space == boundary_space || - CC.Spaces.issubspace(land_space, boundary_space) || - CC.Spaces.issubspace(boundary_space, land_space) - ) + # Only treat spaces as the same if they are the identical object. + # Previous heuristic (== or issubspace) caused broadcasts mixing different spaces, + # triggering large device->host memcopies. We therefore restrict short-circuit logic + # to exact identity and otherwise always use explicit remap! operations. + spaces_same = (land_space === boundary_space) # Update the land simulation's coupled atmosphere state Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) @@ -566,14 +565,12 @@ function FluxCalculator.compute_surface_fluxes!( @. coupled_atmos.u = StaticArrays.SVector(p.scratch1, p.scratch2) # Use scratch space for remapped atmospheric fields to avoid allocations - # Optimize atmospheric field remapping based on space compatibility - if spaces_compatible - # Direct assignment - no remapping needed, avoids device-to-host memory copies + if spaces_same + # If spaces are truly identical, we can assign directly. @. p.scratch1 = csf.ρ_atmos @. p.scratch2 = csf.T_atmos @. p.scratch3 = csf.q_atmos else - # Remap when spaces differ Interfacer.remap!(p.scratch1, csf.ρ_atmos) Interfacer.remap!(p.scratch2, csf.T_atmos) Interfacer.remap!(p.scratch3, csf.q_atmos) @@ -601,30 +598,17 @@ function FluxCalculator.compute_surface_fluxes!( area_fraction = Interfacer.get_field(sim, Val(:area_fraction)) # Combine turbulent energy fluxes from each component of the land model - # Use temporary variables to avoid allocating - if spaces_compatible - # Direct assignment - no remapping needed - @. csf.scalar_temp1 = - canopy_dest.lhf + - soil_dest.lhf * (1 - p.snow.snow_cover_fraction) + - p.snow.snow_cover_fraction * snow_dest.lhf - @. csf.scalar_temp2 = - canopy_dest.shf + - soil_dest.shf * (1 - p.snow.snow_cover_fraction) + - p.snow.snow_cover_fraction * snow_dest.shf - else - # Remap when spaces differ - Interfacer.remap!( - csf.scalar_temp1, - canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.lhf, - ) - Interfacer.remap!( - csf.scalar_temp2, - canopy_dest.shf .+ soil_dest.shf .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.shf, - ) - end + # Always compute on land space then remap to boundary space (avoids mixed-space broadcast). + Interfacer.remap!( + csf.scalar_temp1, + canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.lhf, + ) + Interfacer.remap!( + csf.scalar_temp2, + canopy_dest.shf .+ soil_dest.shf .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.shf, + ) # Zero out the fluxes where the area fraction is zero @. csf.scalar_temp1 = @@ -639,27 +623,15 @@ function FluxCalculator.compute_surface_fluxes!( # Combine turbulent moisture fluxes from each component of the land model # Note that we multiply by ρ_liq to convert from m s-1 to kg m-2 s-1 ρ_liq = (LP.ρ_cloud_liq(sim.model.soil.parameters.earth_param_set)) - if spaces_compatible - # Direct assignment - no remapping needed - @. csf.scalar_temp1 = - ( - canopy_dest.transpiration + - (soil_dest.vapor_flux_liq + soil_dest.vapor_flux_ice) * - (1 - p.snow.snow_cover_fraction) + - p.snow.snow_cover_fraction * snow_dest.vapor_flux - ) * ρ_liq - else - # Remap when spaces differ - Interfacer.remap!( - csf.scalar_temp1, - ( - canopy_dest.transpiration .+ - (soil_dest.vapor_flux_liq .+ soil_dest.vapor_flux_ice) .* - (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.vapor_flux - ) .* ρ_liq, - ) - end + Interfacer.remap!( + csf.scalar_temp1, + ( + canopy_dest.transpiration .+ + (soil_dest.vapor_flux_liq .+ soil_dest.vapor_flux_ice) .* + (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.vapor_flux + ) .* ρ_liq, + ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.F_turb_moisture += csf.scalar_temp1 * area_fraction @@ -667,36 +639,20 @@ function FluxCalculator.compute_surface_fluxes!( # Combine turbulent momentum fluxes from each component of the land model # Note that we exclude the canopy component here for now, since we can have nonzero momentum fluxes # where there is zero LAI. This should be fixed in ClimaLand. - if spaces_compatible - # Direct assignment - no remapping needed - @. csf.scalar_temp1 = - soil_dest.ρτxz * (1 - p.snow.snow_cover_fraction) + - p.snow.snow_cover_fraction * snow_dest.ρτxz - else - # Remap when spaces differ - Interfacer.remap!( - csf.scalar_temp1, - soil_dest.ρτxz .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.ρτxz, - ) - end + Interfacer.remap!( + csf.scalar_temp1, + soil_dest.ρτxz .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.ρτxz, + ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.F_turb_ρτxz += csf.scalar_temp1 * area_fraction - if spaces_compatible - # Direct assignment - no remapping needed - @. csf.scalar_temp1 = - soil_dest.ρτyz * (1 - p.snow.snow_cover_fraction) + - p.snow.snow_cover_fraction * snow_dest.ρτyz - else - # Remap when spaces differ - Interfacer.remap!( - csf.scalar_temp1, - soil_dest.ρτyz .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.ρτyz, - ) - end + Interfacer.remap!( + csf.scalar_temp1, + soil_dest.ρτyz .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.ρτyz, + ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.F_turb_ρτyz += csf.scalar_temp1 * area_fraction @@ -704,19 +660,11 @@ function FluxCalculator.compute_surface_fluxes!( # Combine the buoyancy flux from each component of the land model # Note that we exclude the canopy component here for now, since ClimaLand doesn't # include its extra resistance term in the buoyancy flux calculation. - if spaces_compatible - # Direct assignment - no remapping needed - @. csf.scalar_temp1 = - soil_dest.buoy_flux * (1 - p.snow.snow_cover_fraction) + - p.snow.snow_cover_fraction * snow_dest.buoy_flux - else - # Remap when spaces differ - Interfacer.remap!( - csf.scalar_temp1, - soil_dest.buoy_flux .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.buoy_flux, - ) - end + Interfacer.remap!( + csf.scalar_temp1, + soil_dest.buoy_flux .* (1 .- p.snow.snow_cover_fraction) .+ + p.snow.snow_cover_fraction .* snow_dest.buoy_flux, + ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @. csf.buoyancy_flux += csf.scalar_temp1 * area_fraction From a69321d33030cb6d95418b833be44d7da346ffa8 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 12:55:18 -0800 Subject: [PATCH 06/18] Revert changes to experiments --- .../components/land/climaland_integrated.jl | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index 0a0a6ca1ed..193571a08c 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -550,12 +550,6 @@ function FluxCalculator.compute_surface_fluxes!( land_space = axes(p.soil.turbulent_fluxes) coupled_atmos = sim.model.soil.boundary_conditions.top.atmos - # Only treat spaces as the same if they are the identical object. - # Previous heuristic (== or issubspace) caused broadcasts mixing different spaces, - # triggering large device->host memcopies. We therefore restrict short-circuit logic - # to exact identity and otherwise always use explicit remap! operations. - spaces_same = (land_space === boundary_space) - # Update the land simulation's coupled atmosphere state Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) @@ -565,16 +559,9 @@ function FluxCalculator.compute_surface_fluxes!( @. coupled_atmos.u = StaticArrays.SVector(p.scratch1, p.scratch2) # Use scratch space for remapped atmospheric fields to avoid allocations - if spaces_same - # If spaces are truly identical, we can assign directly. - @. p.scratch1 = csf.ρ_atmos - @. p.scratch2 = csf.T_atmos - @. p.scratch3 = csf.q_atmos - else - Interfacer.remap!(p.scratch1, csf.ρ_atmos) - Interfacer.remap!(p.scratch2, csf.T_atmos) - Interfacer.remap!(p.scratch3, csf.q_atmos) - end + Interfacer.remap!(p.scratch1, csf.ρ_atmos) + Interfacer.remap!(p.scratch2, csf.T_atmos) + Interfacer.remap!(p.scratch3, csf.q_atmos) @. coupled_atmos.thermal_state = TD.PhaseEquil_ρTq(thermo_params, p.scratch1, p.scratch2, p.scratch3) @@ -598,7 +585,7 @@ function FluxCalculator.compute_surface_fluxes!( area_fraction = Interfacer.get_field(sim, Val(:area_fraction)) # Combine turbulent energy fluxes from each component of the land model - # Always compute on land space then remap to boundary space (avoids mixed-space broadcast). + # Use temporary variables to avoid allocating Interfacer.remap!( csf.scalar_temp1, canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ From e40f7356ab4d16e1a9442882a6293940e85c7c37 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 12:56:05 -0800 Subject: [PATCH 07/18] Revert "Revert changes to experiments" This reverts commit a69321d33030cb6d95418b833be44d7da346ffa8. --- .../components/land/climaland_integrated.jl | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index 193571a08c..0a0a6ca1ed 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -550,6 +550,12 @@ function FluxCalculator.compute_surface_fluxes!( land_space = axes(p.soil.turbulent_fluxes) coupled_atmos = sim.model.soil.boundary_conditions.top.atmos + # Only treat spaces as the same if they are the identical object. + # Previous heuristic (== or issubspace) caused broadcasts mixing different spaces, + # triggering large device->host memcopies. We therefore restrict short-circuit logic + # to exact identity and otherwise always use explicit remap! operations. + spaces_same = (land_space === boundary_space) + # Update the land simulation's coupled atmosphere state Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) @@ -559,9 +565,16 @@ function FluxCalculator.compute_surface_fluxes!( @. coupled_atmos.u = StaticArrays.SVector(p.scratch1, p.scratch2) # Use scratch space for remapped atmospheric fields to avoid allocations - Interfacer.remap!(p.scratch1, csf.ρ_atmos) - Interfacer.remap!(p.scratch2, csf.T_atmos) - Interfacer.remap!(p.scratch3, csf.q_atmos) + if spaces_same + # If spaces are truly identical, we can assign directly. + @. p.scratch1 = csf.ρ_atmos + @. p.scratch2 = csf.T_atmos + @. p.scratch3 = csf.q_atmos + else + Interfacer.remap!(p.scratch1, csf.ρ_atmos) + Interfacer.remap!(p.scratch2, csf.T_atmos) + Interfacer.remap!(p.scratch3, csf.q_atmos) + end @. coupled_atmos.thermal_state = TD.PhaseEquil_ρTq(thermo_params, p.scratch1, p.scratch2, p.scratch3) @@ -585,7 +598,7 @@ function FluxCalculator.compute_surface_fluxes!( area_fraction = Interfacer.get_field(sim, Val(:area_fraction)) # Combine turbulent energy fluxes from each component of the land model - # Use temporary variables to avoid allocating + # Always compute on land space then remap to boundary space (avoids mixed-space broadcast). Interfacer.remap!( csf.scalar_temp1, canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ From 376f44b940317daf4f5c35782b16645f4741bcdf Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 13:56:55 -0800 Subject: [PATCH 08/18] Add prints --- experiments/ClimaEarth/components/land/climaland_integrated.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index 0a0a6ca1ed..e30a76360c 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -555,6 +555,8 @@ function FluxCalculator.compute_surface_fluxes!( # triggering large device->host memcopies. We therefore restrict short-circuit logic # to exact identity and otherwise always use explicit remap! operations. spaces_same = (land_space === boundary_space) + println("FluxCalculator: land_space === boundary_space = ", spaces_same) + println("FluxCalculator: land_space == boundary_space = ", land_space == boundary_space) # Update the land simulation's coupled atmosphere state Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) From 46461a2c351b1838d04346c364b5628a0f3da7f7 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 14:07:01 -0800 Subject: [PATCH 09/18] Add NVTX --- experiments/ClimaEarth/Manifest-v1.11.toml | 2 +- experiments/ClimaEarth/Project.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/experiments/ClimaEarth/Manifest-v1.11.toml b/experiments/ClimaEarth/Manifest-v1.11.toml index 36cf16bc33..f30e46a214 100644 --- a/experiments/ClimaEarth/Manifest-v1.11.toml +++ b/experiments/ClimaEarth/Manifest-v1.11.toml @@ -2,7 +2,7 @@ julia_version = "1.11.5" manifest_format = "2.0" -project_hash = "335e1581853b8017ddac2e99475e998831d05cf3" +project_hash = "745c93c3dee8efe7d985f3ed423f923195c3c2ec" [[deps.ADTypes]] git-tree-sha1 = "27cecae79e5cc9935255f90c53bb831cc3c870d7" diff --git a/experiments/ClimaEarth/Project.toml b/experiments/ClimaEarth/Project.toml index ecb32a0051..d514490d77 100644 --- a/experiments/ClimaEarth/Project.toml +++ b/experiments/ClimaEarth/Project.toml @@ -23,6 +23,7 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" +NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f" Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09" Poppler_jll = "9c32591e-4766-534b-9725-b71a8799265b" PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" From a00d64c5586c3fb1f7799b94b22d8464716cd392 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 17 Nov 2025 14:36:32 -0800 Subject: [PATCH 10/18] Add NVTX ranges --- Project.toml | 2 ++ experiments/ClimaEarth/Manifest-v1.11.toml | 2 +- src/FluxCalculator.jl | 12 ++++++++++++ src/Interfacer.jl | 5 ++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 26b427558f..7a47a51a17 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,7 @@ ClimaUtilities = "b3f4f4ca-9299-4f7f-bd9b-81e1242a7513" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" +NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" SurfaceFluxes = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f" @@ -22,6 +23,7 @@ ClimaUtilities = "0.1.22" Dates = "1" JLD2 = "0.5, 0.6" Logging = "1" +NVTX = "1.0.1" SciMLBase = "~2.110, ~2.111, ~2.112" StaticArrays = "1.9.8" SurfaceFluxes = "0.12.3, 0.13" diff --git a/experiments/ClimaEarth/Manifest-v1.11.toml b/experiments/ClimaEarth/Manifest-v1.11.toml index f30e46a214..67059950cf 100644 --- a/experiments/ClimaEarth/Manifest-v1.11.toml +++ b/experiments/ClimaEarth/Manifest-v1.11.toml @@ -456,7 +456,7 @@ uuid = "908f55d8-4145-4867-9c14-5dad1a479e4d" version = "0.4.6" [[deps.ClimaCoupler]] -deps = ["ClimaComms", "ClimaCore", "ClimaUtilities", "Dates", "JLD2", "Logging", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"] +deps = ["ClimaComms", "ClimaCore", "ClimaUtilities", "Dates", "JLD2", "Logging", "NVTX", "SciMLBase", "StaticArrays", "SurfaceFluxes", "Thermodynamics"] path = "../.." uuid = "4ade58fe-a8da-486c-bd89-46df092ec0c7" version = "0.1.2" diff --git a/src/FluxCalculator.jl b/src/FluxCalculator.jl index f571af90a6..1078ed968c 100644 --- a/src/FluxCalculator.jl +++ b/src/FluxCalculator.jl @@ -11,6 +11,7 @@ import SurfaceFluxes as SF import Thermodynamics as TD import Thermodynamics.Parameters as TDP import ClimaCore as CC +import NVTX import ..Interfacer, ..Utilities export extrapolate_ρ_to_sfc, @@ -220,6 +221,17 @@ function compute_surface_fluxes!( sim::Interfacer.SurfaceModelSimulation, atmos_sim::Interfacer.AtmosModelSimulation, thermo_params, +) + NVTX.@range "FluxCalculator.compute_surface_fluxes!(surface)" begin + return _compute_surface_fluxes_surface_impl!(csf, sim, atmos_sim, thermo_params) + end +end + +function _compute_surface_fluxes_surface_impl!( + csf, + sim::Interfacer.SurfaceModelSimulation, + atmos_sim::Interfacer.AtmosModelSimulation, + thermo_params, ) boundary_space = axes(csf) FT = CC.Spaces.undertype(boundary_space) diff --git a/src/Interfacer.jl b/src/Interfacer.jl index f347e98d07..a0e7830703 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -8,6 +8,7 @@ module Interfacer import SciMLBase import ClimaComms import ClimaCore as CC +import NVTX import Dates import Thermodynamics as TD import SciMLBase: step! @@ -515,7 +516,9 @@ Non-ClimaCore fields should provide a method to [`Interfacer.remap`](@ref), or d function. """ function remap!(target_field, source) - target_field .= remap(source, axes(target_field)) + NVTX.@range "Interfacer.remap!" begin + target_field .= remap(source, axes(target_field)) + end return nothing end From 4b6ea7becd114beee5a9b69da2fa9033cdff2528 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 18 Nov 2025 14:24:07 -0800 Subject: [PATCH 11/18] Add prints --- src/Interfacer.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Interfacer.jl b/src/Interfacer.jl index a0e7830703..41040c7797 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -457,9 +457,11 @@ function remap(field::CC.Fields.Field, target_space::CC.Spaces.AbstractSpace) source_space == target_space || CC.Spaces.issubspace(source_space, target_space) || CC.Spaces.issubspace(target_space, source_space) + println("Spaces are compatible: ", spaces_are_compatible) # TODO: Handle remapping of Vectors correctly if hasproperty(field, :components) + println("Field has components") @assert length(field.components) == 1 "Can only work with simple vectors" field = field.components.data.:1 end From e8d248d17e2a22ef649208581e357b65039f70e3 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 18 Nov 2025 15:12:03 -0800 Subject: [PATCH 12/18] Log when spaces are incompatible --- src/Interfacer.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Interfacer.jl b/src/Interfacer.jl index 41040c7797..65ecdc20d6 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -457,7 +457,12 @@ function remap(field::CC.Fields.Field, target_space::CC.Spaces.AbstractSpace) source_space == target_space || CC.Spaces.issubspace(source_space, target_space) || CC.Spaces.issubspace(target_space, source_space) - println("Spaces are compatible: ", spaces_are_compatible) + if !spaces_are_compatible + @info ( + "Remapping field from source space:\n$source_space\n" * + "to target space:\n$target_space" + ) + end # TODO: Handle remapping of Vectors correctly if hasproperty(field, :components) From 430838618b2c89dde10b98122c47d9ec480fef47 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 18 Nov 2025 16:00:30 -0800 Subject: [PATCH 13/18] Add debug output --- .../components/land/climaland_integrated.jl | 26 ++-- src/Interfacer.jl | 140 ++++++++++++++---- 2 files changed, 123 insertions(+), 43 deletions(-) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index e30a76360c..f648627222 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -555,8 +555,6 @@ function FluxCalculator.compute_surface_fluxes!( # triggering large device->host memcopies. We therefore restrict short-circuit logic # to exact identity and otherwise always use explicit remap! operations. spaces_same = (land_space === boundary_space) - println("FluxCalculator: land_space === boundary_space = ", spaces_same) - println("FluxCalculator: land_space == boundary_space = ", land_space == boundary_space) # Update the land simulation's coupled atmosphere state Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) @@ -573,9 +571,9 @@ function FluxCalculator.compute_surface_fluxes!( @. p.scratch2 = csf.T_atmos @. p.scratch3 = csf.q_atmos else - Interfacer.remap!(p.scratch1, csf.ρ_atmos) - Interfacer.remap!(p.scratch2, csf.T_atmos) - Interfacer.remap!(p.scratch3, csf.q_atmos) + Interfacer.remap!(p.scratch1, csf.ρ_atmos; label = "land:ρ_atmos→scratch1") + Interfacer.remap!(p.scratch2, csf.T_atmos; label = "land:T_atmos→scratch2") + Interfacer.remap!(p.scratch3, csf.q_atmos; label = "land:q_atmos→scratch3") end @. coupled_atmos.thermal_state = TD.PhaseEquil_ρTq(thermo_params, p.scratch1, p.scratch2, p.scratch3) @@ -604,12 +602,14 @@ function FluxCalculator.compute_surface_fluxes!( Interfacer.remap!( csf.scalar_temp1, canopy_dest.lhf .+ soil_dest.lhf .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.lhf, + p.snow.snow_cover_fraction .* snow_dest.lhf; + label = "land:LH_combined→boundary", ) Interfacer.remap!( csf.scalar_temp2, canopy_dest.shf .+ soil_dest.shf .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.shf, + p.snow.snow_cover_fraction .* snow_dest.shf; + label = "land:SH_combined→boundary", ) # Zero out the fluxes where the area fraction is zero @@ -632,7 +632,8 @@ function FluxCalculator.compute_surface_fluxes!( (soil_dest.vapor_flux_liq .+ soil_dest.vapor_flux_ice) .* (1 .- p.snow.snow_cover_fraction) .+ p.snow.snow_cover_fraction .* snow_dest.vapor_flux - ) .* ρ_liq, + ) .* ρ_liq; + label = "land:q_flux→boundary", ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @@ -644,7 +645,8 @@ function FluxCalculator.compute_surface_fluxes!( Interfacer.remap!( csf.scalar_temp1, soil_dest.ρτxz .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.ρτxz, + p.snow.snow_cover_fraction .* snow_dest.ρτxz; + label = "land:τxz→boundary", ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @@ -653,7 +655,8 @@ function FluxCalculator.compute_surface_fluxes!( Interfacer.remap!( csf.scalar_temp1, soil_dest.ρτyz .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.ρτyz, + p.snow.snow_cover_fraction .* snow_dest.ρτyz; + label = "land:τyz→boundary", ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) @@ -665,7 +668,8 @@ function FluxCalculator.compute_surface_fluxes!( Interfacer.remap!( csf.scalar_temp1, soil_dest.buoy_flux .* (1 .- p.snow.snow_cover_fraction) .+ - p.snow.snow_cover_fraction .* snow_dest.buoy_flux, + p.snow.snow_cover_fraction .* snow_dest.buoy_flux; + label = "land:buoy_flux→boundary", ) @. csf.scalar_temp1 = ifelse(area_fraction == 0, zero(csf.scalar_temp1), csf.scalar_temp1) diff --git a/src/Interfacer.jl b/src/Interfacer.jl index 65ecdc20d6..41aaeaf646 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -448,7 +448,69 @@ Non-ClimaCore fields should provide a method to this function. """ function remap end -function remap(field::CC.Fields.Field, target_space::CC.Spaces.AbstractSpace) +# Pretty descriptions for debugging remaps +function describe_space(space) + topo = try + CC.Spaces.topology(space) + catch + nothing + end + mesh = isnothing(topo) ? nothing : ( + try + topo.mesh + catch + nothing + end + ) + quad = try + CC.Spaces.quadrature_style(space) + catch + nothing + end + deg = try + isnothing(quad) ? nothing : CC.Spaces.Quadratures.polynomial_degree(quad) + catch + nothing + end + return ( + type = typeof(space), + id = objectid(space), + quad_degree = deg, + topo_type = isnothing(topo) ? nothing : typeof(topo), + mesh_type = isnothing(mesh) ? nothing : typeof(mesh), + ) +end + +function describe_field(f) + vals = CC.Fields.field_values(f) + storage_t = typeof(vals) + # Avoid hard dependency on CUDA + on_gpu = occursin("CuArray", string(storage_t)) + sz = try + size(vals) + catch + () + end + return (eltype = eltype(vals), size = sz, on_gpu = on_gpu, storage_type = storage_t) +end + +# A short, filtered callsite snapshot (skip Interfacer frames) +function short_callsite(; max_frames = 3) + bt = Base.backtrace() + frames = Base.stacktrace(bt) + keep = filter(fr -> !occursin("Interfacer.jl", String(fr.file)), frames) + n = min(length(keep), max_frames) + return [ + (; file = String(keep[i].file), line = keep[i].line, func = keep[i].func) for + i in 1:n + ] +end + +function remap( + field::CC.Fields.Field, + target_space::CC.Spaces.AbstractSpace; + label::Union{Nothing, String, Symbol} = nothing, +) source_space = axes(field) comms_ctx = ClimaComms.context(source_space) @@ -460,8 +522,10 @@ function remap(field::CC.Fields.Field, target_space::CC.Spaces.AbstractSpace) if !spaces_are_compatible @info ( "Remapping field from source space:\n$source_space\n" * - "to target space:\n$target_space" + "to incompatible target space:\n$target_space" ) + cs = short_callsite() + @info "Interfacer.remap: incompatible spaces" label callsite = cs end # TODO: Handle remapping of Vectors correctly @@ -481,36 +545,46 @@ function remap(field::CC.Fields.Field, target_space::CC.Spaces.AbstractSpace) lons = CC.Fields.field2array(coords.long) hcoords = CC.Geometry.LatLongPoint.(lats, lons) - # Remap the field, using MPI if applicable - if comms_ctx isa ClimaComms.SingletonCommsContext - # Remap source field to target space as an array - remapped_array = CC.Remapping.interpolate(field, hcoords, []) - - # Convert remapped array to a field in the target space - return CC.Fields.array2field(remapped_array, target_space) - else - # Gather then broadcast the global hcoords and offsets - offset = [length(hcoords)] - all_hcoords = ClimaComms.bcast(comms_ctx, ClimaComms.gather(comms_ctx, hcoords)) - all_offsets = ClimaComms.bcast(comms_ctx, ClimaComms.gather(comms_ctx, offset)) - - # Interpolate on root and broadcast to all processes - remapper = CC.Remapping.Remapper(source_space; target_hcoords = all_hcoords) - remapped_array = - ClimaComms.bcast(comms_ctx, CC.Remapping.interpolate(remapper, field)) - - my_ending_offset = sum(all_offsets[1:ClimaComms.mypid(comms_ctx)]) - my_starting_offset = my_ending_offset - offset[] - - # Convert remapped array to a field in the target space on each process - return CC.Fields.array2field( - remapped_array[(1 + my_starting_offset):my_ending_offset], - target_space, - ) + # Remap the field, using MPI if applicable, NVTX-labeled + range_name = + isnothing(label) ? "Interfacer.remap:interpolate" : + "Interfacer.remap:interpolate (" * String(label) * ")" + NVTX.range_push(; message = range_name) + out_field = begin + if comms_ctx isa ClimaComms.SingletonCommsContext + # Remap source field to target space as an array + remapped_array = CC.Remapping.interpolate(field, hcoords, []) + # Convert remapped array to a field in the target space + CC.Fields.array2field(remapped_array, target_space) + else + # Gather then broadcast the global hcoords and offsets + offset = [length(hcoords)] + all_hcoords = + ClimaComms.bcast(comms_ctx, ClimaComms.gather(comms_ctx, hcoords)) + all_offsets = + ClimaComms.bcast(comms_ctx, ClimaComms.gather(comms_ctx, offset)) + # Interpolate on root and broadcast to all processes + remapper = CC.Remapping.Remapper(source_space; target_hcoords = all_hcoords) + remapped_array = + ClimaComms.bcast(comms_ctx, CC.Remapping.interpolate(remapper, field)) + my_ending_offset = sum(all_offsets[1:ClimaComms.mypid(comms_ctx)]) + my_starting_offset = my_ending_offset - offset[] + # Convert remapped array to a field in the target space on each process + CC.Fields.array2field( + remapped_array[(1 + my_starting_offset):my_ending_offset], + target_space, + ) + end end + NVTX.range_pop() + return out_field end -function remap(num::Number, target_space::CC.Spaces.AbstractSpace) +function remap( + num::Number, + target_space::CC.Spaces.AbstractSpace; + label::Union{Nothing, String, Symbol} = nothing, +) return num end @@ -522,9 +596,11 @@ Remap the given `source` onto the `target_field`. Non-ClimaCore fields should provide a method to [`Interfacer.remap`](@ref), or directly to this function. """ -function remap!(target_field, source) - NVTX.@range "Interfacer.remap!" begin - target_field .= remap(source, axes(target_field)) +function remap!(target_field, source; label::Union{Nothing, String, Symbol} = nothing) + range_name = + isnothing(label) ? "Interfacer.remap!" : "Interfacer.remap! (" * String(label) * ")" + NVTX.@range range_name begin + target_field .= remap(source, axes(target_field); label) end return nothing end From ebf0dafad5cfa916622380035ee57c7b5190912a Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 18 Nov 2025 16:05:03 -0800 Subject: [PATCH 14/18] Add to stacktrace --- src/Interfacer.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interfacer.jl b/src/Interfacer.jl index 41aaeaf646..0ee874dd03 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -524,7 +524,7 @@ function remap( "Remapping field from source space:\n$source_space\n" * "to incompatible target space:\n$target_space" ) - cs = short_callsite() + cs = short_callsite(max_frames = 5) @info "Interfacer.remap: incompatible spaces" label callsite = cs end From bf3e478e2d1be4c498f6d521e146adc15c76877c Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 18 Nov 2025 16:47:17 -0800 Subject: [PATCH 15/18] Update debug --- experiments/ClimaEarth/components/land/climaland_integrated.jl | 1 + src/Interfacer.jl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/experiments/ClimaEarth/components/land/climaland_integrated.jl b/experiments/ClimaEarth/components/land/climaland_integrated.jl index f648627222..76918dec66 100644 --- a/experiments/ClimaEarth/components/land/climaland_integrated.jl +++ b/experiments/ClimaEarth/components/land/climaland_integrated.jl @@ -557,6 +557,7 @@ function FluxCalculator.compute_surface_fluxes!( spaces_same = (land_space === boundary_space) # Update the land simulation's coupled atmosphere state + @info "Getting height_int from atmosphere simulation" Interfacer.get_field!(coupled_atmos.h, atmos_sim, Val(:height_int)) # Use scratch space for remapped wind vector components to avoid allocations diff --git a/src/Interfacer.jl b/src/Interfacer.jl index 0ee874dd03..41aaeaf646 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -524,7 +524,7 @@ function remap( "Remapping field from source space:\n$source_space\n" * "to incompatible target space:\n$target_space" ) - cs = short_callsite(max_frames = 5) + cs = short_callsite() @info "Interfacer.remap: incompatible spaces" label callsite = cs end From 43bf10017e73b3eb3c7f73fca42d5c59058ca3ed Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 24 Nov 2025 12:37:28 -0800 Subject: [PATCH 16/18] Fix determination of label --- src/Interfacer.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Interfacer.jl b/src/Interfacer.jl index 41aaeaf646..6eb61100f4 100644 --- a/src/Interfacer.jl +++ b/src/Interfacer.jl @@ -264,7 +264,11 @@ end Remap `quantity` in `sim` remapped onto the `target_field`. """ function get_field!(target_field, sim, quantity) - remap!(target_field, get_field(sim, quantity)) + # Extract the symbol from Val{:symbol} if needed + label_str = + quantity isa Val ? "get_field! $(typeof(quantity).parameters[1])" : + "get_field! $quantity" + remap!(target_field, get_field(sim, quantity), label = label_str) return nothing end From eed95ee961740da1cd12a44c85f854fa82d83058 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 24 Nov 2025 16:01:53 -0800 Subject: [PATCH 17/18] Drop Ocean again --- experiments/ClimaEarth/Project.toml | 1 - experiments/ClimaEarth/setup_run.jl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/experiments/ClimaEarth/Project.toml b/experiments/ClimaEarth/Project.toml index bb6f42a904..d514490d77 100644 --- a/experiments/ClimaEarth/Project.toml +++ b/experiments/ClimaEarth/Project.toml @@ -42,7 +42,6 @@ ClimaAtmos = "0.27, 0.28, 0.29, 0.30, 0.31" ClimaCalibrate = "0.1" ClimaDiagnostics = "0.2.6" ClimaLand = "1.0" -ClimaOcean = "0.8.6" ClimaParams = "1.0" ClimaSeaIce = "0.3" ClimaTimeSteppers = "0.7, 0.8" diff --git a/experiments/ClimaEarth/setup_run.jl b/experiments/ClimaEarth/setup_run.jl index d9f26c542c..5ac1068bc9 100644 --- a/experiments/ClimaEarth/setup_run.jl +++ b/experiments/ClimaEarth/setup_run.jl @@ -77,7 +77,7 @@ include("components/land/climaland_integrated.jl") include("components/ocean/slab_ocean.jl") include("components/ocean/prescr_ocean.jl") include("components/ocean/prescr_seaice.jl") -include("components/ocean/oceananigans.jl") +# include("components/ocean/oceananigans.jl") include("components/ocean/clima_seaice.jl") #= From 1508b350aeb906794c1af50b21ae40a7bc343012 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Mon, 24 Nov 2025 16:11:52 -0800 Subject: [PATCH 18/18] Deactivate sea ice --- experiments/ClimaEarth/setup_run.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/ClimaEarth/setup_run.jl b/experiments/ClimaEarth/setup_run.jl index 5ac1068bc9..261e179aea 100644 --- a/experiments/ClimaEarth/setup_run.jl +++ b/experiments/ClimaEarth/setup_run.jl @@ -78,7 +78,7 @@ include("components/ocean/slab_ocean.jl") include("components/ocean/prescr_ocean.jl") include("components/ocean/prescr_seaice.jl") # include("components/ocean/oceananigans.jl") -include("components/ocean/clima_seaice.jl") +# include("components/ocean/clima_seaice.jl") #= ### Configuration Dictionaries