diff --git a/LocalPreferences.toml b/LocalPreferences.toml deleted file mode 100644 index 49f4061..0000000 --- a/LocalPreferences.toml +++ /dev/null @@ -1,3 +0,0 @@ -[CUDA_Runtime_jll] -__clear__ = ["local"] -version = "12.2" diff --git a/Manifest.toml b/Manifest.toml index 5ec1f7d..57bab97 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -27,9 +27,9 @@ weakdeps = ["StaticArrays"] [[deps.ArgParse]] deps = ["Logging", "TextWrap"] -git-tree-sha1 = "d4eccacaa3a632e8717556479d45502af44b4c17" +git-tree-sha1 = "22cf435ac22956a7b45b0168abbc871176e7eecc" uuid = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" -version = "1.1.5" +version = "1.2.0" [[deps.ArgTools]] uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" @@ -37,14 +37,15 @@ version = "1.1.1" [[deps.ArrayInterface]] deps = ["Adapt", "LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "44691067188f6bd1b2289552a23e4b7572f4528d" +git-tree-sha1 = "133a240faec6e074e07c31ee75619c90544179cf" uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.9.0" +version = "7.10.0" [deps.ArrayInterface.extensions] ArrayInterfaceBandedMatricesExt = "BandedMatrices" ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = "CUDSS" ArrayInterfaceChainRulesExt = "ChainRules" ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" ArrayInterfaceReverseDiffExt = "ReverseDiff" @@ -55,6 +56,7 @@ version = "7.9.0" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" @@ -78,9 +80,9 @@ version = "1.1.0" [[deps.BFloat16s]] deps = ["LinearAlgebra", "Printf", "Random", "Test"] -git-tree-sha1 = "dbf84058d0a8cbbadee18d25cf606934b22d7c66" +git-tree-sha1 = "2c7cc21e8678eff479978a0a2ef5ce2f51b63dff" uuid = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" -version = "0.4.2" +version = "0.5.0" [[deps.Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -110,32 +112,37 @@ version = "0.1.3" [[deps.CUDA]] deps = ["AbstractFFTs", "Adapt", "BFloat16s", "CEnum", "CUDA_Driver_jll", "CUDA_Runtime_Discovery", "CUDA_Runtime_jll", "Crayons", "DataFrames", "ExprTools", "GPUArrays", "GPUCompiler", "KernelAbstractions", "LLVM", "LLVMLoopInfo", "LazyArtifacts", "Libdl", "LinearAlgebra", "Logging", "NVTX", "Preferences", "PrettyTables", "Printf", "Random", "Random123", "RandomNumbers", "Reexport", "Requires", "SparseArrays", "StaticArrays", "Statistics"] -git-tree-sha1 = "baa8ea7a1ea63316fa3feb454635215773c9c845" +git-tree-sha1 = "fe61a257e94621e25471071ca58d29ea45eef13b" uuid = "052768ef-5323-5732-b1bb-66c8b64840ba" -version = "5.2.0" -weakdeps = ["ChainRulesCore", "SpecialFunctions"] +version = "5.3.4" [deps.CUDA.extensions] ChainRulesCoreExt = "ChainRulesCore" + EnzymeCoreExt = "EnzymeCore" SpecialFunctionsExt = "SpecialFunctions" + [deps.CUDA.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" + [[deps.CUDA_Driver_jll]] deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "d01bfc999768f0a31ed36f5d22a76161fc63079c" +git-tree-sha1 = "dc172b558adbf17952001e15cf0d6364e6d78c2f" uuid = "4ee394cb-3365-5eb0-8335-949819d2adfc" -version = "0.7.0+1" +version = "0.8.1+0" [[deps.CUDA_Runtime_Discovery]] deps = ["Libdl"] -git-tree-sha1 = "2cb12f6b2209f40a4b8967697689a47c50485490" +git-tree-sha1 = "38f830504358e9972d2a0c3e5d51cb865e0733df" uuid = "1af6417a-86b4-443c-805f-a4643ffb695f" -version = "0.2.3" +version = "0.2.4" [[deps.CUDA_Runtime_jll]] deps = ["Artifacts", "CUDA_Driver_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "8e25c009d2bf16c2c31a70a6e9e8939f7325cc84" +git-tree-sha1 = "4ca7d6d92075906c2ce871ea8bba971fff20d00c" uuid = "76a88914-d11a-5bdc-97e0-2f5a05c973a2" -version = "0.11.1+0" +version = "0.12.1+0" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] @@ -149,21 +156,21 @@ weakdeps = ["SparseArrays"] [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] -git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4" +git-tree-sha1 = "b10d0b65641d57b8b4d5e234446582de5047050d" uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" -version = "0.11.4" +version = "0.11.5" [[deps.Colors]] deps = ["ColorTypes", "FixedPointNumbers", "Reexport"] -git-tree-sha1 = "fc08e5930ee9a4e03f84bfb5211cb54e7769758a" +git-tree-sha1 = "362a287c3aa50601b0bc359053d5c2468f0e7ce0" uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" -version = "0.12.10" +version = "0.12.11" [[deps.CommonDataModel]] deps = ["CFTime", "DataStructures", "Dates", "Preferences", "Printf", "Statistics"] -git-tree-sha1 = "d7d7b58e149f19c322840a50d1bc20e8c23addb4" +git-tree-sha1 = "d6fb5bf939a2753c74984b11434ea25d6c397a58" uuid = "1fbeeb36-5f17-413c-809b-666fb144f157" -version = "0.3.5" +version = "0.3.6" [[deps.CommonSubexpressions]] deps = ["MacroTools", "Test"] @@ -173,9 +180,9 @@ version = "0.3.0" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "c955881e3c981181362ae4088b35995446298b80" +git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.14.0" +version = "4.15.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -224,9 +231,9 @@ version = "1.6.1" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "0f4b5d62a88d8f59003e43c25a8a90de9eb76317" +git-tree-sha1 = "1d0a14036acb104d9e89698bd408f63ab58cdc82" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.18" +version = "0.18.20" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -314,9 +321,9 @@ uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" [[deps.FiniteDiff]] deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "bc0c5092d6caaea112d3c8e3b238d61563c58d5f" +git-tree-sha1 = "2de436b72c3422940cbe1367611d137008af7ec3" uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.23.0" +version = "2.23.1" [deps.FiniteDiff.extensions] FiniteDiffBandedMatricesExt = "BandedMatrices" @@ -330,9 +337,9 @@ version = "2.23.0" [[deps.FixedPointNumbers]] deps = ["Statistics"] -git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc" +git-tree-sha1 = "05882d6995ae5c12bb5f36dd2ed3f61c98cbb172" uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" -version = "0.8.4" +version = "0.8.5" [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] @@ -355,9 +362,9 @@ version = "6.2.1+6" [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "47e4686ec18a9620850bad110b79966132f14283" +git-tree-sha1 = "38cb19b8a3e600e509dc36a6396ac74266d108c1" uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "10.0.2" +version = "10.1.1" [[deps.GPUArraysCore]] deps = ["Adapt"] @@ -367,9 +374,9 @@ version = "0.1.6" [[deps.GPUCompiler]] deps = ["ExprTools", "InteractiveUtils", "LLVM", "Libdl", "Logging", "Scratch", "TimerOutputs", "UUIDs"] -git-tree-sha1 = "a846f297ce9d09ccba02ead0cae70690e072a119" +git-tree-sha1 = "1600477fba37c9fc067b9be21f5e8101f24a8865" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -version = "0.25.0" +version = "0.26.4" [[deps.Glob]] git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" @@ -413,9 +420,9 @@ version = "1.4.0" [[deps.IntelOpenMP_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] -git-tree-sha1 = "5fdf2fe6724d8caabf43b557b84ce53f3b7e2f6b" +git-tree-sha1 = "be50fe8df3acbffa0274a744f1a99d29c45a57f4" uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2024.0.2+0" +version = "2024.1.0+0" [[deps.InteractiveUtils]] deps = ["Markdown"] @@ -455,10 +462,10 @@ uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" [[deps.JLD2]] -deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "Pkg", "PrecompileTools", "Printf", "Reexport", "Requires", "TranscodingStreams", "UUIDs"] -git-tree-sha1 = "5ea6acdd53a51d897672edb694e3cc2912f3f8a7" +deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "Pkg", "PrecompileTools", "Reexport", "Requires", "TranscodingStreams", "UUIDs", "Unicode"] +git-tree-sha1 = "bdbe8222d2f5703ad6a7019277d149ec6d78c301" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.4.46" +version = "0.4.48" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] @@ -486,9 +493,9 @@ version = "0.2.1+0" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "ed7167240f40e62d97c1f5f7735dea6de3cc5c49" +git-tree-sha1 = "db02395e4c374030c53dc28f3c1d33dec35f7272" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.18" +version = "0.9.19" [deps.KernelAbstractions.extensions] EnzymeExt = "EnzymeCore" @@ -498,9 +505,9 @@ version = "0.9.18" [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] -git-tree-sha1 = "ab01dde107f21aa76144d0771dccc08f152ccac7" +git-tree-sha1 = "839c82932db86740ae729779e610f07a1640be9a" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "6.6.2" +version = "6.6.3" weakdeps = ["BFloat16s"] [deps.LLVM.extensions] @@ -610,10 +617,10 @@ uuid = "5ced341a-0733-55b8-9ab6-a4889d929147" version = "1.9.4+0" [[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl"] -git-tree-sha1 = "72dc3cf284559eb8f53aa593fe62cb33f83ed0c0" +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "80b2833b56d466b3858d565adcd16a4a05f2089b" uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2024.0.0+0" +version = "2024.1.0+0" [[deps.MPI]] deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PkgVersion", "PrecompileTools", "Requires", "Serialization", "Sockets"] @@ -631,21 +638,21 @@ version = "0.20.16" [[deps.MPICH_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "656036b9ed6f942d35e536e249600bc31d0f9df8" +git-tree-sha1 = "4099bb6809ac109bfc17d521dad33763bcf026b7" uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" -version = "4.2.0+0" +version = "4.2.1+1" [[deps.MPIPreferences]] deps = ["Libdl", "Preferences"] -git-tree-sha1 = "8f6af051b9e8ec597fa09d8885ed79fd582f33c9" +git-tree-sha1 = "c105fe467859e7f6e9a852cb15cb4301126fac07" uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" -version = "0.1.10" +version = "0.1.11" [[deps.MPItrampoline_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] -git-tree-sha1 = "77c3bd69fdb024d75af38713e883d0f249ce19c2" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "ce0ca3dd147c43de175c5aff161315a424f4b8ac" uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" -version = "5.3.2+0" +version = "5.3.3+1" [[deps.MacroTools]] deps = ["Markdown", "Random"] @@ -670,9 +677,9 @@ version = "10.1.4+2" [[deps.Missings]] deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" +version = "1.2.0" [[deps.Mmap]] uuid = "a63ad114-7e13-5084-954f-fe012c677804" @@ -683,9 +690,9 @@ version = "2023.1.10" [[deps.NCDatasets]] deps = ["CFTime", "CommonDataModel", "DataStructures", "Dates", "DiskArrays", "NetCDF_jll", "NetworkOptions", "Printf"] -git-tree-sha1 = "d40d24d12f710c39d3a66be99c567ce0032f28a7" +git-tree-sha1 = "a640912695952b074672edb5f9aaee2f7f9fd59a" uuid = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" -version = "0.14.3" +version = "0.14.4" [[deps.NLSolversBase]] deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] @@ -735,9 +742,9 @@ version = "1.2.0" [[deps.Oceananigans]] deps = ["Adapt", "CUDA", "Crayons", "CubedSphere", "Dates", "Distances", "DocStringExtensions", "FFTW", "Glob", "IncompleteLU", "InteractiveUtils", "IterativeSolvers", "JLD2", "KernelAbstractions", "LinearAlgebra", "Logging", "MPI", "NCDatasets", "OffsetArrays", "OrderedCollections", "PencilArrays", "PencilFFTs", "Pkg", "Printf", "Random", "Rotations", "SeawaterPolynomials", "SparseArrays", "Statistics", "StructArrays"] -git-tree-sha1 = "3a5d2b1d9a237731f886a657e72e4a52a7f6fb2b" +git-tree-sha1 = "6aa48ccf34ac89fbd8db20cafa5f25c0d4aaa55a" uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09" -version = "0.90.14" +version = "0.91.0" [deps.Oceananigans.extensions] OceananigansEnzymeExt = "Enzyme" @@ -746,15 +753,15 @@ version = "0.90.14" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" [[deps.Oceanostics]] -deps = ["DocStringExtensions", "Oceananigans", "Printf"] -git-tree-sha1 = "41e65d86b17a5e9ffde63ca2f04f39a9c421f3c0" +deps = ["DocStringExtensions", "Oceananigans", "Printf", "SeawaterPolynomials"] +git-tree-sha1 = "bc733aea599610ae03c95d32e11f4f928784fe13" uuid = "d0ccf422-c8fb-49b5-a76d-74acdde946ac" -version = "0.14.0" +version = "0.14.1" [[deps.OffsetArrays]] -git-tree-sha1 = "6a731f2b5c03157418a20c12195eb4b74c8f8621" +git-tree-sha1 = "e64b4f5ea6b7389f6f046d13d4896a8f9c1ba71e" uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.13.0" +version = "1.14.0" weakdeps = ["Adapt"] [deps.OffsetArrays.extensions] @@ -801,9 +808,9 @@ version = "0.24.1+0" [[deps.PMIx_jll]] deps = ["Artifacts", "Hwloc_jll", "JLLWrappers", "Libdl", "Zlib_jll", "libevent_jll"] -git-tree-sha1 = "8b3b19351fa24791f94d7ae85faf845ca1362541" +git-tree-sha1 = "360f48126b5f2c2f0c833be960097f7c62705976" uuid = "32165bc3-0280-59bc-8c0b-c33b6203efab" -version = "4.2.7+0" +version = "4.2.9+0" [[deps.PackageExtensionCompat]] git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" @@ -856,9 +863,9 @@ version = "0.3.3" [[deps.Polynomials]] deps = ["LinearAlgebra", "RecipesBase", "Setfield", "SparseArrays"] -git-tree-sha1 = "a9c7a523d5ed375be3983db190f6a5874ae9286d" +git-tree-sha1 = "89620a0b5458dca4bf9ea96174fa6422b3adf6f9" uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45" -version = "4.0.6" +version = "4.0.8" [deps.Polynomials.extensions] PolynomialsChainRulesCoreExt = "ChainRulesCore" @@ -973,9 +980,9 @@ version = "1.3.0" [[deps.Rotations]] deps = ["LinearAlgebra", "Quaternions", "Random", "StaticArrays"] -git-tree-sha1 = "2a0a5d8569f481ff8840e3b7c84bbf188db6a3fe" +git-tree-sha1 = "5680a9276685d392c87407df00d57c9924d9f11e" uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" -version = "1.7.0" +version = "1.7.1" weakdeps = ["RecipesBase"] [deps.Rotations.extensions] @@ -998,9 +1005,9 @@ version = "0.3.4" [[deps.SentinelArrays]] deps = ["Dates", "Random"] -git-tree-sha1 = "0e7508ff27ba32f26cd459474ca2ede1bc10991f" +git-tree-sha1 = "90b4f68892337554d31cdcdbe19e48989f26c7e6" uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" -version = "1.4.1" +version = "1.4.3" [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -1031,9 +1038,9 @@ version = "1.10.0" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +git-tree-sha1 = "2f5d4697f21388cbe1ff299430dd169ef97d7e14" uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" +version = "2.4.0" weakdeps = ["ChainRulesCore"] [deps.SpecialFunctions.extensions] @@ -1058,9 +1065,9 @@ weakdeps = ["OffsetArrays", "StaticArrays"] [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "bf074c045d3d5ffd956fa0a461da38a44685d6b2" +git-tree-sha1 = "9ae599cd7529cfce7fea36cf00a62cfc56f0f37c" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.9.3" +version = "1.9.4" weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] @@ -1177,20 +1184,20 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [[deps.TextWrap]] -git-tree-sha1 = "9250ef9b01b66667380cf3275b3f7488d0e25faf" +git-tree-sha1 = "43044b737fa70bc12f6105061d3da38f881a3e3c" uuid = "b718987f-49a8-5099-9789-dcd902bef87d" -version = "1.0.1" +version = "1.0.2" [[deps.TimerOutputs]] deps = ["ExprTools", "Printf"] -git-tree-sha1 = "f548a9e9c490030e545f72074a41edfd0e5bcdd7" +git-tree-sha1 = "5a13ae8a41237cff5ecf34f73eb1b8f42fff6531" uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.23" +version = "0.5.24" [[deps.TranscodingStreams]] -git-tree-sha1 = "71509f04d045ec714c4748c785a59045c3736349" +git-tree-sha1 = "5d54d076465da49d6746c647022f3b3674e64156" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" -version = "0.10.7" +version = "0.10.8" weakdeps = ["Random", "Test"] [deps.TranscodingStreams.extensions] @@ -1220,9 +1227,9 @@ version = "0.2.1" [[deps.UnsafeAtomicsLLVM]] deps = ["LLVM", "UnsafeAtomics"] -git-tree-sha1 = "323e3d0acf5e78a56dfae7bd8928c989b4f3083e" +git-tree-sha1 = "d9f5962fecd5ccece07db1ff006fb0b5271bdfdd" uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" -version = "0.1.3" +version = "0.1.4" [[deps.VersionParsing]] git-tree-sha1 = "58d6e80b4ee071f5efd07fda82cb9fbe17200868" @@ -1237,9 +1244,9 @@ version = "1.0.0" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "532e22cf7be8462035d092ff21fada7527e2c488" +git-tree-sha1 = "52ff2af32e591541550bd753c0da8b9bc92bb9d9" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.12.6+0" +version = "2.12.7+0" [[deps.XZ_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -1286,6 +1293,12 @@ deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" version = "1.52.0+1" +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "7d0ea0f4895ef2f5cb83645fa689e52cb55cf493" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2021.12.0+0" + [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" diff --git a/idealized/run_lesbrary_simulation.jl b/idealized/run_lesbrary_simulation.jl index fbb3e24..d2f587a 100644 --- a/idealized/run_lesbrary_simulation.jl +++ b/idealized/run_lesbrary_simulation.jl @@ -32,10 +32,10 @@ using LESbrary.IdealizedExperiments: seventy_two_hour_suite_parameters # which slices of the simulation is saved) from the default 2 minutes to 1 minute # (to make pretty movies). -architecture = CPU() +architecture = GPU() #size = (32, 32, 32) -size = (64, 64, 64) -#size = (128, 128, 128) +#size = (64, 64, 64) +size = (128, 128, 128) #size = (256, 256, 256) #size = (256, 256, 384) # case = :strong_wind @@ -45,18 +45,18 @@ data_directory = "." #/home/greg/Projects/LESbrary.jl/data" cases = [ :strong_wind_and_sunny, #:strong_wind, - #:free_convection, + :free_convection, #:weak_wind_strong_cooling, #:med_wind_med_cooling, #:strong_wind_weak_cooling, - #:strong_wind_no_rotation + :strong_wind_no_rotation ] -#= -suites = [twelve_hour_suite_parameters, +suites = [six_hour_suite_parameters, + twelve_hour_suite_parameters, twenty_four_hour_suite_parameters, - forty_eight_hour_suite_parameters] -=# + forty_eight_hour_suite_parameters, + seventy_two_hour_suite_parameters] suite = six_hour_suite_parameters #suite = twelve_hour_suite_parameters @@ -64,19 +64,8 @@ suite = six_hour_suite_parameters #suite = forty_eight_hour_suite_parameters #suite = seventy_two_hour_suite_parameters -@inline κˢ(x, y, z, t) = ifelse(z > -5, 1e-2, zero(z)) - for case in cases - suite_parameters = suite[case] - - # suite_parameters[:stokes_drift] = false - # name = suite_parameters[:name] - # suite_parameters[:name] = name * "_no_stokes" - - # suite_parameters[:background_diffusivity] = κˢ - # name = suite_parameters[:name] - # suite_parameters[:name] = name * "_surface_diffusivity" - + suite_parameters = deepcopy(suite[case]) name = suite_parameters[:name] suite_parameters[:name] = name * "_with_tracer" @@ -89,5 +78,47 @@ for case in cases snapshot_time_interval, suite_parameters...) run!(simulation) + + ##### + ##### To run the case with no Stokes drift + ##### + + #= + suite_parameters = deepcopy(suite[case]) + suite_parameters[:stokes_drift] = false + name = suite_parameters[:name] + suite_parameters[:name] = name * "_no_stokes" + + simulation = three_layer_constant_fluxes_simulation(; architecture, + size, + checkpoint = false, + pickup = false, + passive_tracers = true, + data_directory, + snapshot_time_interval, + suite_parameters...) + run!(simulation) + =# + + ##### + ##### To run with a subgrid closure + ##### + + #= + suite_parameters = deepcopy(suite[case]) + suite_parameters[:explicit_closure] = true + name = suite_parameters[:name] + suite_parameters[:name] = name * "_explicit_closure" + + simulation = three_layer_constant_fluxes_simulation(; architecture, + size, + checkpoint = false, + pickup = false, + passive_tracers = true, + data_directory, + snapshot_time_interval, + suite_parameters...) + run!(simulation) + =# end diff --git a/src/IdealizedExperiments/IdealizedExperiments.jl b/src/IdealizedExperiments/IdealizedExperiments.jl index 3a8fca2..5d17952 100644 --- a/src/IdealizedExperiments/IdealizedExperiments.jl +++ b/src/IdealizedExperiments/IdealizedExperiments.jl @@ -15,83 +15,88 @@ include("constant_flux_stokes_drift.jl") include("three_layer_constant_fluxes.jl") six_hour_suite_parameters = Dict{Symbol, Any}( - :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 9.6e-7, :f => 1e-4), - :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -5.0e-4, :buoyancy_flux => 8.0e-7, :f => 1e-4), - :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -8.0e-4, :buoyancy_flux => 6.4e-7, :f => 1e-4), - :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -1.2e-3, :buoyancy_flux => 4.0e-7, :f => 1e-4), - :strong_wind => Dict{Symbol, Any}(:momentum_flux => -1.4e-3, :buoyancy_flux => 0.0, :f => 1e-4), - :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -1.1e-3, :buoyancy_flux => 0.0, :f => 0.0), - :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -1.5e-3, :penetrating_buoyancy_flux => -5e-7, :f => 0), + :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 9.6e-7, :f => 1e-4), + :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -5.0e-4, :buoyancy_flux => 8.0e-7, :f => 1e-4), + :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -8.0e-4, :buoyancy_flux => 6.4e-7, :f => 1e-4), + :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -1.2e-3, :buoyancy_flux => 4.0e-7, :f => 1e-4), + :strong_wind => Dict{Symbol, Any}(:momentum_flux => -1.4e-3, :buoyancy_flux => 0.0, :f => 1e-4), + :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -1.1e-3, :buoyancy_flux => 0.0, :f => 0.0), + :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -1.5e-3, :penetrating_buoyancy_flux => -5e-7, :f => 0.0), ) for (name, set) in six_hour_suite_parameters set[:name] = string(name) set[:stop_time] = 6hours set[:stokes_drift] = true + set[:tracer_forcing_timescale] = 30minutes end twelve_hour_suite_parameters = Dict{Symbol, Any}( - :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 4.8e-7, :f => 1e-4), - :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -4.0e-4, :buoyancy_flux => 4.0e-7, :f => 1e-4), - :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -6.0e-4, :buoyancy_flux => 3.2e-7, :f => 1e-4), - :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -8.0e-4, :buoyancy_flux => 2.0e-7, :f => 1e-4), - :strong_wind => Dict{Symbol, Any}(:momentum_flux => -9.0e-4, :buoyancy_flux => 0.0, :f => 1e-4), - :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -6.0e-4, :buoyancy_flux => 0.0, :f => 0.0), - :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -7.0e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0), + :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 4.8e-7, :f => 1e-4), + :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -4.0e-4, :buoyancy_flux => 4.0e-7, :f => 1e-4), + :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -6.0e-4, :buoyancy_flux => 3.2e-7, :f => 1e-4), + :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -8.0e-4, :buoyancy_flux => 2.0e-7, :f => 1e-4), + :strong_wind => Dict{Symbol, Any}(:momentum_flux => -9.0e-4, :buoyancy_flux => 0.0, :f => 1e-4), + :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -6.0e-4, :buoyancy_flux => 0.0, :f => 0.0), + :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -9.0e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0.0), ) for (name, set) in twelve_hour_suite_parameters set[:name] = string(name) set[:stop_time] = 12hours set[:stokes_drift] = true + set[:tracer_forcing_timescale] = 1hours end twenty_four_hour_suite_parameters = Dict{Symbol, Any}( - :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 2.4e-7, :f => 1e-4), - :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -3.0e-4, :buoyancy_flux => 2.0e-7, :f => 1e-4), - :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -4.5e-4, :buoyancy_flux => 1.6e-7, :f => 1e-4), - :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -5.9e-4, :buoyancy_flux => 1.0e-7, :f => 1e-4), - :strong_wind => Dict{Symbol, Any}(:momentum_flux => -6.8e-4, :buoyancy_flux => 0.0, :f => 1e-4), - :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -3.0e-4, :buoyancy_flux => 0.0, :f => 0.0), - :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -4.0e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0), + :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 2.4e-7, :f => 1e-4), + :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -3.0e-4, :buoyancy_flux => 2.0e-7, :f => 1e-4), + :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -4.5e-4, :buoyancy_flux => 1.6e-7, :f => 1e-4), + :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -5.9e-4, :buoyancy_flux => 1.0e-7, :f => 1e-4), + :strong_wind => Dict{Symbol, Any}(:momentum_flux => -6.8e-4, :buoyancy_flux => 0.0, :f => 1e-4), + :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -3.0e-4, :buoyancy_flux => 0.0, :f => 0.0), + :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -4.5e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0.0), ) for (name, set) in twenty_four_hour_suite_parameters set[:name] = string(name) set[:stop_time] = 24hours set[:stokes_drift] = true + set[:tracer_forcing_timescale] = 2hours end forty_eight_hour_suite_parameters = Dict{Symbol, Any}( - :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 1.2e-7, :f => 1e-4), - :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -2.0e-4, :buoyancy_flux => 1.0e-7, :f => 1e-4), - :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -3.4e-4, :buoyancy_flux => 8.0e-8, :f => 1e-4), - :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -3.8e-4, :buoyancy_flux => 5.0e-8, :f => 1e-4), - :strong_wind => Dict{Symbol, Any}(:momentum_flux => -4.5e-4, :buoyancy_flux => 0.0, :f => 1e-4), - :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -1.6e-4, :buoyancy_flux => 0.0, :f => 0.0), - :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -2.0e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0), + :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 1.2e-7, :f => 1e-4), + :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -2.0e-4, :buoyancy_flux => 1.0e-7, :f => 1e-4), + :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -3.4e-4, :buoyancy_flux => 8.0e-8, :f => 1e-4), + :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -3.8e-4, :buoyancy_flux => 5.0e-8, :f => 1e-4), + :strong_wind => Dict{Symbol, Any}(:momentum_flux => -4.5e-4, :buoyancy_flux => 0.0, :f => 1e-4), + :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -1.6e-4, :buoyancy_flux => 0.0, :f => 0.0), + :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -2.4e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0.0), ) for (name, set) in forty_eight_hour_suite_parameters set[:name] = string(name) set[:stop_time] = 48hours set[:stokes_drift] = true + set[:tracer_forcing_timescale] = 4hours end seventy_two_hour_suite_parameters = Dict{Symbol, Any}( - :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 8.7e-8, :f => 1e-4), - :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -1.8e-4, :buoyancy_flux => 7.5e-8, :f => 1e-4), - :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -2.9e-4, :buoyancy_flux => 6.0e-8, :f => 1e-4), - :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -3.4e-4, :buoyancy_flux => 3.8e-8, :f => 1e-4), - :strong_wind => Dict{Symbol, Any}(:momentum_flux => -4.1e-4, :buoyancy_flux => 0.0, :f => 1e-4), - :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -1.1e-4, :buoyancy_flux => 0.0, :f => 0.0), - :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -1.5e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0), + :free_convection => Dict{Symbol, Any}(:momentum_flux => 0.0, :buoyancy_flux => 8.7e-8, :f => 1e-4), + :weak_wind_strong_cooling => Dict{Symbol, Any}(:momentum_flux => -1.8e-4, :buoyancy_flux => 7.5e-8, :f => 1e-4), + :med_wind_med_cooling => Dict{Symbol, Any}(:momentum_flux => -2.9e-4, :buoyancy_flux => 6.0e-8, :f => 1e-4), + :strong_wind_weak_cooling => Dict{Symbol, Any}(:momentum_flux => -3.4e-4, :buoyancy_flux => 3.8e-8, :f => 1e-4), + :strong_wind => Dict{Symbol, Any}(:momentum_flux => -4.1e-4, :buoyancy_flux => 0.0, :f => 1e-4), + :strong_wind_no_rotation => Dict{Symbol, Any}(:momentum_flux => -1.1e-4, :buoyancy_flux => 0.0, :f => 0.0), + :strong_wind_and_sunny => Dict{Symbol, Any}(:momentum_flux => -1.5e-4, :penetrating_buoyancy_flux => -5e-7, :f => 0.0), ) for (name, set) in seventy_two_hour_suite_parameters set[:name] = string(name) set[:stop_time] = 72hours set[:stokes_drift] = true + set[:tracer_forcing_timescale] = 8hours end end # module diff --git a/src/IdealizedExperiments/three_layer_constant_fluxes.jl b/src/IdealizedExperiments/three_layer_constant_fluxes.jl index 3468164..014ddb6 100644 --- a/src/IdealizedExperiments/three_layer_constant_fluxes.jl +++ b/src/IdealizedExperiments/three_layer_constant_fluxes.jl @@ -24,8 +24,8 @@ Logging.global_logger(OceananigansLogger()) @inline passive_tracer_forcing(x, y, z, t, p) = p.μ⁺ * exp(-(z - p.z₀)^2 / (2 * p.λ^2)) - p.μ⁻ -const c = Center() -const f = Face() +const ce = Center() +const fa = Face() struct TwoExponentialPenetratingFlux{FT} <: Function surface_flux :: FT @@ -65,7 +65,7 @@ function three_layer_constant_fluxes_simulation(; name = "", size = (32, 32, 32), passive_tracers = false, - subgrid_scale_closure = true, + explicit_closure = false, extent = (512meters, 512meters, 256meters), architecture = CPU(), stop_time = 0.1hours, @@ -74,13 +74,13 @@ function three_layer_constant_fluxes_simulation(; buoyancy_flux = 0.0, penetrating_buoyancy_flux = nothing, momentum_flux = 0.0, + tracer_forcing_timescale = 6hours, thermocline_type = "linear", surface_layer_depth = 48.0, thermocline_width = 24.0, surface_layer_buoyancy_gradient = 2e-6, thermocline_buoyancy_gradient = 1e-5, deep_buoyancy_gradient = 2e-6, - surface_temperature = 20.0, stokes_drift = true, # will use ConstantFluxStokesDrift with stokes_drift_peak_wavenumber stokes_drift_peak_wavenumber = 1e-6 * 9.81 / abs(momentum_flux), # severe approximation, it is what it is pickup = false, @@ -140,22 +140,14 @@ function three_layer_constant_fluxes_simulation(; @info "Enforcing boundary conditions..." - equation_of_state = LinearEquationOfState(thermal_expansion=2e-4) - buoyancy = SeawaterBuoyancy(; equation_of_state, constant_salinity=35.0) + buoyancy = BuoyancyTracer() N²_surface_layer = surface_layer_buoyancy_gradient N²_thermocline = thermocline_buoyancy_gradient N²_deep = deep_buoyancy_gradient - α = buoyancy.equation_of_state.thermal_expansion - g = buoyancy.gravitational_acceleration - - Jᶿ = Jᵇ / (α * g) - dθdz_surface_layer = N²_surface_layer / (α * g) - dθdz_thermocline = N²_thermocline / (α * g) - dθdz_deep = N²_deep / (α * g) - - θ_bcs = FieldBoundaryConditions(top = FluxBoundaryCondition(Jᶿ), - bottom = GradientBoundaryCondition(dθdz_deep)) + + b_bcs = FieldBoundaryConditions(top = FluxBoundaryCondition(Jᵇ), + bottom = GradientBoundaryCondition(N²_deep)) u_bcs = FieldBoundaryConditions(top = FluxBoundaryCondition(τˣ)) @@ -173,13 +165,13 @@ function three_layer_constant_fluxes_simulation(; z_transition = z[k_transition] z_deep = z[k_deep] - θ_surface = surface_temperature - θ_transition = θ_surface + z_transition * dθdz_surface_layer - θ_deep = θ_transition + (z_deep - z_transition) * dθdz_thermocline + b_surface = zero(grid) + b_transition = b_surface + z_transition * N²_surface_layer + b_deep = b_transition + (z_deep - z_transition) * N²_thermocline # Passive tracer parameters λ = 4.0 - μ⁺ = 1 / 6hour + μ⁺ = 1 / tracer_forcing_timescale μ₀ = √(2π) * λ / grid.Lz * μ⁺ / 2 μ∞ = √(2π) * λ / grid.Lz * μ⁺ c_forcing = Forcing(passive_tracer_forcing, parameters=(z₀=-48.0, λ=λ, μ⁺=μ⁺, μ⁻=μ∞)) @@ -188,17 +180,17 @@ function three_layer_constant_fluxes_simulation(; gaussian_mask = GaussianMask{:z}(center=-grid.Lz, width=grid.Lz/10) u_sponge = v_sponge = w_sponge = Relaxation(rate=4/hour, mask=gaussian_mask) - T_sponge = Relaxation(rate = 4/hour, - target = LinearTarget{:z}(intercept = θ_deep - z_deep*dθdz_deep, gradient = dθdz_deep), + b_sponge = Relaxation(rate = 4/hour, + target = LinearTarget{:z}(intercept = b_deep - z_deep*N²_deep, gradient = N²_deep), mask = gaussian_mask) if penetrating_buoyancy_flux isa Number - Iᶿ = penetrating_buoyancy_flux / (α * g) - dIdz = minus_penetrating_flux_divergence(grid; I₀=Iᶿ) - T_penetrating_flux = Forcing(dIdz) - T_forcing = (T_sponge, T_penetrating_flux) + Iᵇ = penetrating_buoyancy_flux + dIdz = minus_penetrating_flux_divergence(grid; I₀=Iᵇ) + b_penetrating_flux = Forcing(dIdz) + b_forcing = (b_sponge, b_penetrating_flux) elseif isnothing(penetrating_buoyancy_flux) - T_forcing = T_sponge + b_forcing = b_sponge end if stokes_drift && momentum_flux != 0.0 @@ -220,11 +212,11 @@ function three_layer_constant_fluxes_simulation(; @info "Framing the model..." - tracers = passive_tracers ? (:T, :c) : :T + tracers = passive_tracers ? (:b, :c) : :b - if subgrid_scale_closure + if explicit_closure Nz = Base.size(grid, 3) - Δz = zspacing(1, 1, Nz, grid, c, c, c) + Δz = CUDA.@allowscalar zspacing(1, 1, Nz, grid, ce, ce, ce) C = SurfaceEnhancedModelConstant(Δz) closure = AnisotropicMinimumDissipation(; C) advection = CenteredSecondOrder() @@ -236,12 +228,12 @@ function three_layer_constant_fluxes_simulation(; model = NonhydrostaticModel(; grid, buoyancy, tracers, stokes_drift, closure, advection, timestepper = :RungeKutta3, coriolis = FPlane(; f), - boundary_conditions = (T=θ_bcs, u=u_bcs), - forcing = (u=u_sponge, v=v_sponge, w=w_sponge, T=T_forcing, c=c_forcing)) + boundary_conditions = (b=b_bcs, u=u_bcs), + forcing = (u=u_sponge, v=v_sponge, w=w_sponge, b=b_forcing, c=c_forcing)) # # Set Initial condition - @info "Build model:" + @info "Built model:" @info "$model" @info "Setting initial conditions..." @@ -249,16 +241,16 @@ function three_layer_constant_fluxes_simulation(; ## Noise with 8 m decay scale Ξ(z) = rand() * exp(z / 8) - function thermocline_structure_function(thermocline_type, z_transition, θ_transition, z_deep, - θ_deep, dθdz_surface_layer, dθdz_thermocline, dθdz_deep) + function thermocline_structure_function(thermocline_type, z_transition, b_transition, z_deep, + b_deep, N²_surface_layer, N²_thermocline, N²_deep) if thermocline_type == "linear" - return z -> θ_transition + dθdz_thermocline * (z - z_transition) + return z -> b_transition + N²_thermocline * (z - z_transition) elseif thermocline_type == "cubic" - p1 = (z_transition, θ_transition) - p2 = (z_deep, θ_deep) - coeffs = fit_cubic(p1, p2, dθdz_surface_layer, dθdz_deep) + p1 = (z_transition, b_transition) + p2 = (z_deep, b_deep) + coeffs = fit_cubic(p1, p2, N²_surface_layer, N²_deep) return z -> poly(z, coeffs) else @@ -266,28 +258,28 @@ function three_layer_constant_fluxes_simulation(; end end - θ_thermocline = thermocline_structure_function(thermocline_type, z_transition, θ_transition, z_deep, θ_deep, - dθdz_surface_layer, dθdz_thermocline, dθdz_deep) + b_thermocline = thermocline_structure_function(thermocline_type, z_transition, b_transition, z_deep, b_deep, + N²_surface_layer, N²_thermocline, N²_deep) """ - initial_temperature(x, y, z) + initial_buoyancy(x, y, z) - Returns a three-layer initial temperature distribution. The average temperature varies in z + Returns a three-layer initial buoyancy distribution. The average buoyancy varies in z and is augmented by three-dimensional, surface-concentrated random noise. """ - function initial_temperature(x, y, z) - noise = 1e-3 * Ξ(z) * dθdz_surface_layer * grid.Lz + function initial_buoyancy(x, y, z) + noise = 1e-3 * Ξ(z) * N²_surface_layer * grid.Lz if z_transition < z <= 0 - return θ_surface + dθdz_surface_layer * z + noise + return b_surface + N²_surface_layer * z + noise elseif z_deep < z <= z_transition - return θ_thermocline(z) + noise + return b_thermocline(z) + noise else - return θ_deep + dθdz_deep * (z - z_deep) + noise + return b_deep + N²_deep * (z - z_deep) + noise end end - set!(model, T = initial_temperature) + set!(model, b = initial_buoyancy) # # Prepare the simulation @@ -342,8 +334,17 @@ function three_layer_constant_fluxes_simulation(; # If we change to WENO(order=9) so there are no subfilter fluxes... #subfilter_flux_statistics = merge(subfilter_momentum_fluxes(model), subfilter_tracer_fluxes(model)) #statistics_to_output = merge(primitive_statistics, subfilter_flux_statistics, additional_statistics) - statistics_to_output = merge(primitive_statistics, additional_statistics) - + #statistics_to_output = merge(primitive_statistics, additional_statistics) + u, v, w = model.velocities + b = model.tracers.b + c = model.tracers.c + # statistics_to_output = NamedTuple(u=Average(u, dims=(1, 2)) #primitive_statistics + statistics_to_output = (; + u = Average(u, dims=(1, 2)), + v = Average(v, dims=(1, 2)), + b = Average(b, dims=(1, 2)), + c = Average(c, dims=(1, 2)), + ) @info "Garnishing output writers..." @info " - with fields: $(keys(fields_to_output))" @@ -357,12 +358,9 @@ function three_layer_constant_fluxes_simulation(; global_attributes[:buoyancy_flux] = Jᵇ global_attributes[:penetrating_buoyancy_flux] = penetrating_buoyancy_flux global_attributes[:momentum_flux] = τˣ - global_attributes[:temperature_flux] = Jᶿ global_attributes[:coriolis_parameter] = f - global_attributes[:thermal_expansion_coefficient] = α - global_attributes[:gravitational_acceleration] = g - global_attributes[:boundary_condition_θ_top] = Jᶿ - global_attributes[:boundary_condition_θ_bottom] = dθdz_deep + global_attributes[:boundary_condition_b_top] = Jᵇ + global_attributes[:boundary_condition_b_bottom] = N²_deep global_attributes[:boundary_condition_u_top] = τˣ global_attributes[:boundary_condition_u_bottom] = 0.0 global_attributes[:surface_layer_depth] = surface_layer_depth @@ -370,12 +368,10 @@ function three_layer_constant_fluxes_simulation(; global_attributes[:N²_surface_layer] = N²_surface_layer global_attributes[:N²_thermocline] = N²_thermocline global_attributes[:N²_deep] = N²_deep - global_attributes[:dθdz_surface_layer] = dθdz_surface_layer - global_attributes[:dθdz_thermocline] = dθdz_thermocline - global_attributes[:dθdz_deep] = dθdz_deep - global_attributes[:θ_surface] = θ_surface - global_attributes[:θ_transition] = θ_transition - global_attributes[:θ_deep] = θ_deep + global_attributes[:N²_surface_layer] = N²_surface_layer + global_attributes[:b_surface] = b_surface + global_attributes[:b_transition] = b_transition + global_attributes[:b_deep] = b_deep global_attributes[:z_transition] = z_transition global_attributes[:z_deep] = z_deep global_attributes[:k_transition] = k_transition diff --git a/src/NearSurfaceTurbulenceModels.jl b/src/NearSurfaceTurbulenceModels.jl index 994d721..0f1012d 100644 --- a/src/NearSurfaceTurbulenceModels.jl +++ b/src/NearSurfaceTurbulenceModels.jl @@ -30,7 +30,7 @@ for an LES eddy diffusivity model with the surface-enhanced form """ function SurfaceEnhancedModelConstant(Δz; FT=Float64, C₀=1/12, z₀=-Δz/2, - enhancement=4, decay_scale=4Δz) + enhancement=10, decay_scale=8Δz) return SurfaceEnhancedModelConstant{FT}(C₀, Δz, z₀, enhancement, decay_scale) end