From 563bb7bb1ce044e88108908026b2c4d5c5d32684 Mon Sep 17 00:00:00 2001 From: nefrathenrici Date: Tue, 31 Oct 2023 12:25:31 -0700 Subject: [PATCH] working well! --- examples/Manifest.toml | 241 +----------------- examples/driver-job-array.sbatch | 51 ---- examples/driver.sbatch | 48 ---- examples/job_array.sh | 13 +- examples/model_run.sbatch | 2 +- .../ekp_config.yml | 2 +- .../observation_map.jl | 1 + .../prior.toml | 4 +- examples/update.sbatch | 2 + plot/Project.toml | 5 + src/atmos_interface.jl | 2 +- src/ekp_interface.jl | 5 +- 12 files changed, 22 insertions(+), 354 deletions(-) delete mode 100644 examples/driver-job-array.sbatch delete mode 100644 examples/driver.sbatch diff --git a/examples/Manifest.toml b/examples/Manifest.toml index 2706b2b7..ac019b0f 100644 --- a/examples/Manifest.toml +++ b/examples/Manifest.toml @@ -51,12 +51,6 @@ version = "1.1.4" uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" version = "1.1.1" -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.2.0" - [[deps.Arpack]] deps = ["Arpack_jll", "Libdl", "LinearAlgebra", "Logging"] git-tree-sha1 = "9b9b347613394885fd1c8c7729bfc60528faa436" @@ -91,12 +85,6 @@ version = "7.4.11" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" -[[deps.ArrayInterfaceCore]] -deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" -uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" -version = "0.1.29" - [[deps.ArrayLayouts]] deps = ["FillArrays", "LinearAlgebra"] git-tree-sha1 = "9a731850434825d183af39c6e6cd0a1c32dd7e20" @@ -253,8 +241,8 @@ weakdeps = ["SparseArrays"] ChainRulesCoreSparseArraysExt = "SparseArrays" [[deps.ClimaAtmos]] -deps = ["ArgParse", "ArtifactWrappers", "Artifacts", "AtmosphericProfilesLibrary", "CLIMAParameters", "CUDA", "ClimaComms", "ClimaCore", "ClimaTimeSteppers", "CloudMicrophysics", "Colors", "Dates", "Dierckx", "DiffEqBase", "DiffEqCallbacks", "Distributions", "DocStringExtensions", "FastGaussQuadrature", "ImageFiltering", "Insolation", "Interpolations", "IntervalSets", "JLD2", "Krylov", "LambertW", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "OrdinaryDiffEq", "Pkg", "Printf", "RRTMGP", "Random", "RootSolvers", "SciMLBase", "StaticArrays", "Statistics", "StatsBase", "SurfaceFluxes", "TerminalLoggers", "Test", "Thermodynamics", "YAML"] -git-tree-sha1 = "2ff03750666c30d1027d24006422b1122fb47b82" +deps = ["ArgParse", "ArtifactWrappers", "Artifacts", "AtmosphericProfilesLibrary", "CLIMAParameters", "CUDA", "ClimaComms", "ClimaCore", "ClimaTimeSteppers", "CloudMicrophysics", "Colors", "Dates", "Dierckx", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FastGaussQuadrature", "ImageFiltering", "Insolation", "Interpolations", "IntervalSets", "JLD2", "Krylov", "LinearAlgebra", "Logging", "NCDatasets", "NVTX", "Pkg", "Printf", "RRTMGP", "Random", "RootSolvers", "SciMLBase", "StaticArrays", "Statistics", "StatsBase", "SurfaceFluxes", "Test", "Thermodynamics", "YAML"] +git-tree-sha1 = "ce681442e025c59bfce30aca4d95ed8c455b574d" repo-rev = "gb/diagnostics_ready" repo-url = "https://github.com/CliMA/ClimaAtmos.jl.git" uuid = "b2c96348-7fb7-4fe0-8da9-78d88439e717" @@ -361,11 +349,6 @@ git-tree-sha1 = "52cb3ec90e8a8bea0e62e275ba577ad0f74821f7" uuid = "ed09eef8-17a6-5b46-8889-db040fac31e3" version = "0.3.2" -[[deps.ConcreteStructs]] -git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" -uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" -version = "0.2.3" - [[deps.ConstructionBase]] deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" @@ -564,12 +547,6 @@ git-tree-sha1 = "d8701002a745c450c03b890f10d53636d1a8a7ea" uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" version = "0.6.2" -[[deps.ExponentialUtilities]] -deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] -git-tree-sha1 = "602e4585bcbd5a25bc06f514724593d13ff9e862" -uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" -version = "1.25.0" - [[deps.ExprTools]] git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" @@ -610,12 +587,6 @@ git-tree-sha1 = "0f478d8bad6f52573fb7658a263af61f3d96e43a" uuid = "442a2c76-b920-505d-bb47-c5924d526838" version = "0.5.1" -[[deps.FastLapackInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" -uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "2.0.0" - [[deps.FileIO]] deps = ["Pkg", "Requires", "UUIDs"] git-tree-sha1 = "299dc33549f68299137e51e6d49a13b5b1da9673" @@ -725,23 +696,11 @@ git-tree-sha1 = "055849d7a602c31eda477a0b0b86c9473a3e4fb9" uuid = "e4b2fa32-6e09-5554-b718-106ed5adafe9" version = "2.2.4" -[[deps.GenericSchur]] -deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" -uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.3" - [[deps.GilbertCurves]] git-tree-sha1 = "3e076ca96e34a47e98a46657b2bec2655a366d80" uuid = "88fa7841-ef32-4516-bb70-c6ec135699d9" version = "0.1.0" -[[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.9.0" - [[deps.HDF5]] deps = ["Compat", "HDF5_jll", "Libdl", "MPIPreferences", "Mmap", "Preferences", "Printf", "Random", "Requires", "UUIDs"] git-tree-sha1 = "26407bd1c60129062cec9da63dc7d08251544d53" @@ -758,12 +717,6 @@ git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739" uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" version = "1.14.2+1" -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.16" - [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" @@ -793,11 +746,6 @@ git-tree-sha1 = "432ae2b430a18c58eb7eca9ef8d0f2db90bc749c" uuid = "6a3955dd-da59-5b1f-98d4-e7296123deb5" version = "0.7.8" -[[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" - [[deps.Insolation]] deps = ["Artifacts", "Dates", "DelimitedFiles", "Interpolations"] git-tree-sha1 = "36fe16ea725ed8c8eb5fd066fd8d0ef14adc80dd" @@ -864,12 +812,6 @@ git-tree-sha1 = "af433a10f3942e882d3c671aacb203e006a5808f" uuid = "9c1d0b0a-7046-5b2e-a33f-ea22f176ac7e" version = "0.2.1+0" -[[deps.KLU]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "884c2968c2e8e7e6bf5956af88cb46aa745c854b" -uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.4.1" - [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] git-tree-sha1 = "5f1ecfddb6abde48563d08b2cc7e5116ebcd6c27" @@ -910,11 +852,6 @@ git-tree-sha1 = "f689897ccbe049adb19a065c495e75f372ecd42b" uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" version = "15.0.4+0" -[[deps.LambertW]] -git-tree-sha1 = "c5ffc834de5d61d00d2b0e18c96267cffc21f648" -uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" -version = "0.4.6" - [[deps.LayoutPointers]] deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" @@ -931,12 +868,6 @@ version = "0.15.1" deps = ["Artifacts", "Pkg"] uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" -[[deps.LeftChildRightSiblingTrees]] -deps = ["AbstractTrees"] -git-tree-sha1 = "fb6803dafae4a5d62ea5cab204b1e657d9737e7f" -uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" -version = "0.2.0" - [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" @@ -981,38 +912,6 @@ git-tree-sha1 = "a58ab1d18efa0bcf9f0868c6d387e4126dad3e72" uuid = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125" version = "2.5.2" -[[deps.LinearSolve]] -deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "5f97525abf8d81f9554e836a7e5802fd89bb0594" -uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.12.1" - - [deps.LinearSolve.extensions] - LinearSolveBandedMatricesExt = "BandedMatrices" - LinearSolveBlockDiagonalsExt = "BlockDiagonals" - LinearSolveCUDAExt = "CUDA" - LinearSolveEnzymeExt = "Enzyme" - LinearSolveHYPREExt = "HYPRE" - LinearSolveIterativeSolversExt = "IterativeSolvers" - LinearSolveKernelAbstractionsExt = "KernelAbstractions" - LinearSolveKrylovKitExt = "KrylovKit" - LinearSolveMetalExt = "Metal" - LinearSolvePardisoExt = "Pardiso" - LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" - - [deps.LinearSolve.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" - IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" - RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" - [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" @@ -1032,17 +931,6 @@ version = "0.3.26" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.165" -weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - SpecialFunctionsExt = "SpecialFunctions" - [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] git-tree-sha1 = "2ce8695e1e699b68702c03402672a69f54b8aca9" @@ -1200,20 +1088,6 @@ version = "400.902.208+0" uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" -[[deps.NonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "EnumX", "FiniteDiff", "ForwardDiff", "LineSearches", "LinearAlgebra", "LinearSolve", "PrecompileTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "UnPack"] -git-tree-sha1 = "9203b3333c9610664de2e8cbc23cfd726663df7d" -uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "2.4.0" - - [deps.NonlinearSolve.extensions] - NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" - NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" - - [deps.NonlinearSolve.weakdeps] - FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" - LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" - [[deps.OffsetArrays]] deps = ["Adapt"] git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" @@ -1265,24 +1139,12 @@ git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" version = "1.6.2" -[[deps.OrdinaryDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "def999a7447854f0e9ca9fdda235e04a65916b76" -uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.58.0" - [[deps.PDMats]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] git-tree-sha1 = "66b2fcd977db5329aa35cac121e5b94dd6472198" uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" version = "0.11.28" -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - [[deps.PaddedViews]] deps = ["OffsetArrays"] git-tree-sha1 = "0fac6313486baae819364c52b4f483450a9d793f" @@ -1368,12 +1230,6 @@ git-tree-sha1 = "b437cdb0385ed38312d91d9c00c20f3798b30256" uuid = "49802e3a-d2f1-5c88-81d8-b72133a6f568" version = "1.5.1" -[[deps.ProgressLogging]] -deps = ["Logging", "SHA", "UUIDs"] -git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" -uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" -version = "0.1.4" - [[deps.QuadGK]] deps = ["DataStructures", "LinearAlgebra"] git-tree-sha1 = "9ebcd48c498668c7fa0e97a9cae873fbee7bfee1" @@ -1440,12 +1296,6 @@ version = "2.38.10" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" -[[deps.RecursiveFactorization]] -deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] -git-tree-sha1 = "2b6d4a40339aa02655b1743f4cd7c03109f520c1" -uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -version = "0.2.20" - [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -1514,12 +1364,6 @@ git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" uuid = "94e857df-77ce-4151-89e5-788b33177be4" version = "0.1.0" -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "4b8586aece42bee682399c4c4aee95446aa5cd19" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.39" - [[deps.SciMLBase]] deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] git-tree-sha1 = "151c322c309d879d114d1c0bee69c61d5933357f" @@ -1538,12 +1382,6 @@ version = "2.4.3" RCall = "6f49c342-dc21-5d91-9882-a32aef131414" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" -[[deps.SciMLNLSolve]] -deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] -git-tree-sha1 = "765b788339abd7d983618c09cfc0192e2b6b15fd" -uuid = "e9a6253c-8580-4d32-9898-8661bb511710" -version = "0.1.9" - [[deps.SciMLOperators]] deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] git-tree-sha1 = "65c2e6ced6f62ea796af251eb292a0e131a3613b" @@ -1569,35 +1407,6 @@ version = "1.1.1" deps = ["Distributed", "Mmap", "Random", "Serialization"] uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" -[[deps.SimpleNonlinearSolve]] -deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "15ff97fa4881133caa324dacafe28b5ac47ad8a2" -uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "0.1.23" - - [deps.SimpleNonlinearSolve.extensions] - SimpleNonlinearSolveNNlibExt = "NNlib" - - [deps.SimpleNonlinearSolve.weakdeps] - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.4" - -[[deps.SimpleUnPack]] -git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" -uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" -version = "1.1.0" - -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - [[deps.Sockets]] uuid = "6462fe0b-24de-5631-8697-dd941f90decc" @@ -1611,28 +1420,6 @@ version = "1.2.0" deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "336fd944a1bbb8873bfa8171387608ca93317d68" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.8.0" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" - - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.Sparspak]] -deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] -git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" -uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" -version = "0.3.9" - [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" @@ -1785,12 +1572,6 @@ git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" version = "0.1.1" -[[deps.TerminalLoggers]] -deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] -git-tree-sha1 = "f133fab380933d042f6796eda4e130272ba520ca" -uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" -version = "0.1.7" - [[deps.Test]] deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -1833,12 +1614,6 @@ weakdeps = ["Random", "Test"] [deps.TranscodingStreams.extensions] TestExt = ["Test", "Random"] -[[deps.TriangularSolve]] -deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] -git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" -uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -version = "0.1.19" - [[deps.Tricks]] git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" @@ -1873,18 +1648,6 @@ git-tree-sha1 = "323e3d0acf5e78a56dfae7bd8928c989b4f3083e" uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" version = "0.1.3" -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.64" - -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" - [[deps.WoodburyMatrices]] deps = ["LinearAlgebra", "SparseArrays"] git-tree-sha1 = "de67fa59e33ad156a590055375a30b23c40299d3" diff --git a/examples/driver-job-array.sbatch b/examples/driver-job-array.sbatch deleted file mode 100644 index dedf5699..00000000 --- a/examples/driver-job-array.sbatch +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -#SBATCH --time=2:00:00 -#SBATCH --job-name=cal-main -#SBATCH --ntasks=40 -#SBATCH --cpus-per-task=8 -#SBATCH --mem-per-cpu=8G -#SBATCH --output=calibration-job_array-%j.out -#SBATCH --mail-user=nat.henrici@gmail.com -#SBATCH --mail-type=BEGIN,END,FAIL - -# Load required modules -module load julia/1.9.3 cuda/12.2 ucx/1.14.1_cuda-12.2 openmpi/4.1.5_cuda-12.2 hdf5/1.12.2-ompi415 -export OMPI_MCA_opal_warn_on_missing_libcuda=0 - -# Check if a job ID is provided as a command-line argument -job_id=${1?Error: no job ID given} -echo "Running job: $job_id" - -# Instantiate the Julia project -julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)' - -echo 'Initializing ensemble for calibration.' - -julia --project=examples -e " -import CalibrateAtmos -using Distributions -using EnsembleKalmanProcesses.ParameterDistributions -CalibrateAtmos.initialize(\"$job_id\")" - -# Get ensemble size and the number of iterations from configuration file -ensemble_size=$(grep "ensemble_size:" examples/$job_id/ekp_config.yml | awk '{print $2}') -n_iterations=$(grep "n_iterations:" examples/$job_id/ekp_config.yml | awk '{print $2}') - -# Loop over iterations -# tasks_per_task=$(( $ensemble_size / $SLURM_NTASKS )) -tasks_per_task=4 -dep="" -for i in $(seq 0 $n_iterations) -do - echo "Scheduling Iteration $i" - echo "Dep for model run iter $i: $dep" - - ensemble_array_id=$(sbatch --dependency=$dep --parsable --job=model-$i --ntasks=$tasks_per_task --array=1-$ensemble_size examples/model_run.sbatch $job_id $i) - dep="afterany:$ensemble_array_id" - echo "Dep for update at iter $i: $dep" - format_i=$(printf "iteration_%03d" "$i") - - update_id=$(sbatch --dependency=$dep --job=update-$i --output=output/$job_id/$format_i/update_log.out --parsable examples/update.sbatch $job_id $i) - dep="afterany:$update_id" - echo "ekp update job $i: $update_id" -done diff --git a/examples/driver.sbatch b/examples/driver.sbatch deleted file mode 100644 index ce54c348..00000000 --- a/examples/driver.sbatch +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -#SBATCH --time=12:00:00 -#SBATCH -J cal-parallel -#SBATCH --cpus-per-task=8 -#SBATCH --ntasks=4 -#SBATCH --mem-per-cpu=8G -# #SBATCH --gpus=1 -#SBATCH --output=calibration-parallel.out -# #SBATCH --mail-user=nefrathe@caltech.edu -#SBATCH --mail-type=END,FAIL - -module load julia/1.9.3 cuda/12.2 ucx/1.14.1_cuda-12.2 openmpi/4.1.5_cuda-12.2 hdf5/1.12.2-ompi415 -export JULIA_LOAD_PATH=":examples/load_path" - -job_id=${1?Error: no job ID given} -echo "Running job: $job_id" - -julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)' - -# This is a bit messy - could be file -julia --project=examples -e "import CalibrateAtmos; using Distributions; - using EnsembleKalmanProcesses.ParameterDistributions; - CalibrateAtmos.initialize(\"$job_id\")" - -echo 'Ensemble initialized for calibration.' - -ensemble_size=$(grep "ensemble_size:" examples/$job_id/ekp_config.yml | awk '{print $2}') -n_iterations=$(grep "n_iterations:" examples/$job_id/ekp_config.yml | awk '{print $2}') - -for iteration in $(seq 0 $n_iterations) -do - -for i in $(seq 1 $ensemble_size) -do - echo "Running iteration $iteration, member $i" - srun --ntasks 4 julia --project=examples -e \ - "import CalibrateAtmos; - atmos_config = CalibrateAtmos.get_atmos_config($i, $iteration, \"$job_id\"); - CalibrateAtmos.run_forward_model(atmos_config)" -done - -julia --project=examples -e \ - "import CalibrateAtmos; - include(\"examples/$job_id/observation_map.jl\"); - observation_map($iteration, \"$job_id\"); - CalibrateAtmos.update_ensemble(\"$job_id\", $iteration)" -done - diff --git a/examples/job_array.sh b/examples/job_array.sh index 73ee1879..a36ec914 100755 --- a/examples/job_array.sh +++ b/examples/job_array.sh @@ -1,23 +1,23 @@ #!/bin/bash + +# Set number of tasks per model run tasks_per_ensemble=8 -# Load required modules +# Configure for cluster module load julia/1.9.3 cuda/12.2 ucx/1.14.1_cuda-12.2 openmpi/4.1.5_cuda-12.2 hdf5/1.12.2-ompi415 export OMPI_MCA_opal_warn_on_missing_libcuda=0 +export JULIA_NUM_PRECOMPILE_TASKS=8 +export JULIA_CPU_TARGET='broadwell;skylake' # Check if a job ID is provided as a command-line argument job_id=${1?Error: no job ID given} -# exec > output/$job_id/log.out 2>&1 echo "Running job: $job_id" # Instantiate the Julia project -export JULIA_CPU_TARGET='broadwell;skylake' - julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)' echo 'Initializing ensemble for calibration.' - julia --project=examples -e " import CalibrateAtmos using Distributions @@ -43,6 +43,3 @@ do dep="afterany:$update_id" echo "Model run $(($i+1)) will wait for $update_id" done - -# Restore output to stdout -# exec >&- diff --git a/examples/model_run.sbatch b/examples/model_run.sbatch index 68b0d5c5..7c6f4316 100644 --- a/examples/model_run.sbatch +++ b/examples/model_run.sbatch @@ -1,5 +1,5 @@ #!/bin/bash -#SBATCH --time=4:00:00 +#SBATCH --time=2:00:00 #SBATCH --cpus-per-task=8 #SBATCH --mem-per-cpu=8G #SBATCH --mail-user=nat.henrici@gmail.com diff --git a/examples/sphere_held_suarez_rhoe_equilmoist/ekp_config.yml b/examples/sphere_held_suarez_rhoe_equilmoist/ekp_config.yml index 5cb0ef8e..19f6301c 100644 --- a/examples/sphere_held_suarez_rhoe_equilmoist/ekp_config.yml +++ b/examples/sphere_held_suarez_rhoe_equilmoist/ekp_config.yml @@ -2,6 +2,6 @@ output_dir: output/sphere_held_suarez_rhoe_equilmoist prior_path: examples/sphere_held_suarez_rhoe_equilmoist/prior.toml parameter_names: ["equator_pole_temperature_gradient_wet"] ensemble_size: 10 -n_iterations: 5 +n_iterations: 3 obs_mean: examples/sphere_held_suarez_rhoe_equilmoist/obs_mean.jld2 obs_noise_cov: examples/sphere_held_suarez_rhoe_equilmoist/obs_noise_cov.jld2 diff --git a/examples/sphere_held_suarez_rhoe_equilmoist/observation_map.jl b/examples/sphere_held_suarez_rhoe_equilmoist/observation_map.jl index 92aaa636..71ebfe83 100644 --- a/examples/sphere_held_suarez_rhoe_equilmoist/observation_map.jl +++ b/examples/sphere_held_suarez_rhoe_equilmoist/observation_map.jl @@ -63,4 +63,5 @@ function observation_map(iteration, job_id) ) iter_path = joinpath(member_path[1:(length(member_path) - 1)]) JLD2.save_object(joinpath(iter_path, "observation_map.jld2"), G_ens) + return G_ens end diff --git a/examples/sphere_held_suarez_rhoe_equilmoist/prior.toml b/examples/sphere_held_suarez_rhoe_equilmoist/prior.toml index 7cadef81..4d70f130 100644 --- a/examples/sphere_held_suarez_rhoe_equilmoist/prior.toml +++ b/examples/sphere_held_suarez_rhoe_equilmoist/prior.toml @@ -1,6 +1,6 @@ ["equator_pole_temperature_gradient_wet"] -prior = "Parameterized(Normal(4.1291,0.3007608))" -# approximates a positive distribution with mean 65, std of 20 +prior = "Parameterized(Normal(4.779568,0.31223328))" constraint = "[bounded_below(0)]" +# EKP.ParameterDistributions.constrained_gaussian("name", 125, 40, 0, Inf) type = "float" alias = "ΔT_y_wet" diff --git a/examples/update.sbatch b/examples/update.sbatch index 9e3f88b7..f7305b6e 100644 --- a/examples/update.sbatch +++ b/examples/update.sbatch @@ -10,6 +10,8 @@ echo "Iteration $i" julia --project=examples -e ' import CalibrateAtmos + using Distributions + using EnsembleKalmanProcesses.ParameterDistributions include("examples/'$job_id'/observation_map.jl") observation_map('$i', "'$job_id'") CalibrateAtmos.update_ensemble("'${job_id}'", '$i') diff --git a/plot/Project.toml b/plot/Project.toml index 50f1320c..93aed651 100644 --- a/plot/Project.toml +++ b/plot/Project.toml @@ -2,3 +2,8 @@ CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" ClimaCore = "d414da3d-4745-48bb-8d80-42e94e092884" +Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +EnsembleKalmanProcesses = "aa8a2aa5-91d8-4396-bcef-d4f2ec43552d" +JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" +TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" diff --git a/src/atmos_interface.jl b/src/atmos_interface.jl index fa288753..dc39815d 100644 --- a/src/atmos_interface.jl +++ b/src/atmos_interface.jl @@ -16,7 +16,7 @@ function get_atmos_config(member, iteration, config_dict::AbstractDict) config_dict["output_dir"] = member_path parameter_path = joinpath(member_path, "parameters.toml") config_dict["toml"] = [parameter_path] - + # Turn off default diagnostics config_dict["output_default_diagnostics"] = false diff --git a/src/ekp_interface.jl b/src/ekp_interface.jl index 7ff8cb69..9ff4d045 100644 --- a/src/ekp_interface.jl +++ b/src/ekp_interface.jl @@ -43,13 +43,13 @@ function initialize( output_dir = config["output_dir"] prior_path = config["prior_path"] - names = config["parameter_names"] + param_names = config["parameter_names"] ensemble_size = config["ensemble_size"] # Save in EKI object in iteration_000 folder eki_path = joinpath(output_dir, "iteration_000", "eki_file.jld2") param_dict = TOML.parsefile(prior_path) - prior_vec = [get_parameter_distribution(param_dict, n) for n in names] + prior_vec = [get_parameter_distribution(param_dict, n) for n in param_names] prior = combine_distributions(prior_vec) initial_ensemble = @@ -115,7 +115,6 @@ function update_ensemble( output_dir, "parameters.toml", iteration, - apply_constraints = false, ) # Save EKI object for next iteration