From f56a24efad7c81589912c95114236b2da48761af Mon Sep 17 00:00:00 2001 From: LenkaNovak Date: Fri, 19 Jan 2024 17:22:56 -0800 Subject: [PATCH] retain output, precip sign fix, use rho_ice revert test for #570 revert test for #570 --- Project.toml | 2 + experiments/AMIP/Manifest.toml | 109 +++++++++++------- experiments/AMIP/Project.toml | 2 + .../components/atmosphere/climaatmos_init.jl | 4 +- .../AMIP/components/land/bucket_utils.jl | 2 + experiments/AMIP/coupler_driver.jl | 6 +- 6 files changed, 81 insertions(+), 44 deletions(-) diff --git a/Project.toml b/Project.toml index fafc4e1d8..297b485df 100644 --- a/Project.toml +++ b/Project.toml @@ -15,7 +15,9 @@ DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" Insolation = "e98cc03f-d57e-4e3c-b70c-8d51efe9e0d8" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" +OhMyREPL = "5fb14364-9ced-5910-84b2-373655c76a03" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/experiments/AMIP/Manifest.toml b/experiments/AMIP/Manifest.toml index 25db0de49..c3136c589 100644 --- a/experiments/AMIP/Manifest.toml +++ b/experiments/AMIP/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.10.0" +julia_version = "1.9.3" manifest_format = "2.0" -project_hash = "e30e3cec173b96ef0f39af976fadb60750b6f220" +project_hash = "5f9676e9b348ce4cc4bda21daced193401a0651f" [[deps.ADTypes]] git-tree-sha1 = "41c37aa88889c171f1300ceac1313c06e891d245" @@ -303,7 +303,7 @@ uuid = "d934ef94-cdd4-4710-83d6-720549644b70" version = "0.3.12" [[deps.ClimaCoupler]] -deps = ["CLIMAParameters", "ClimaAtmos", "ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "ClimaLSM", "Dates", "DocStringExtensions", "Insolation", "JLD2", "NCDatasets", "Plots", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "TempestRemap_jll", "Thermodynamics"] +deps = ["CLIMAParameters", "ClimaAtmos", "ClimaComms", "ClimaCore", "ClimaCoreTempestRemap", "ClimaLSM", "Dates", "DocStringExtensions", "Insolation", "JLD2", "NCDatasets", "OhMyREPL", "Plots", "Revise", "SciMLBase", "StaticArrays", "Statistics", "SurfaceFluxes", "TempestRemap_jll", "Thermodynamics"] path = "../.." uuid = "4ade58fe-a8da-486c-bd89-46df092ec0c7" version = "0.1.0" @@ -332,6 +332,12 @@ git-tree-sha1 = "a6993c57af74e2e0f2191b556178cc8d8c0df9d6" uuid = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b" version = "0.15.1" +[[deps.CodeTracking]] +deps = ["InteractiveUtils", "UUIDs"] +git-tree-sha1 = "c0216e792f518b39b22212127d4a84dc31e4e386" +uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" +version = "1.3.5" + [[deps.CodecZlib]] deps = ["TranscodingStreams", "Zlib_jll"] git-tree-sha1 = "cd67fc487743b2f0fd4380d4cbd3a24660d0eec8" @@ -396,7 +402,7 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+1" +version = "1.0.5+0" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" @@ -505,9 +511,9 @@ version = "0.1.0+0" [[deps.DiffEqBase]] deps = ["ArrayInterface", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] -git-tree-sha1 = "6af33c2eb7478db06bcf5c810e6f3dda53aac2ac" +git-tree-sha1 = "044648af911974c3928058c1f8c83f159dece274" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.146.0" +version = "6.145.6" [deps.DiffEqBase.extensions] DiffEqBaseChainRulesCoreExt = "ChainRulesCore" @@ -1014,12 +1020,23 @@ git-tree-sha1 = "60b1194df0a3298f460063de985eae7b01bc011a" uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" version = "3.0.1+0" +[[deps.JuliaInterpreter]] +deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] +git-tree-sha1 = "04663b9e1eb0d0eabf76a6d0752e0dac83d53b36" +uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" +version = "0.9.28" + [[deps.JuliaNVTXCallbacks_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] git-tree-sha1 = "af433a10f3942e882d3c671aacb203e006a5808f" uuid = "9c1d0b0a-7046-5b2e-a33f-ea22f176ac7e" version = "0.2.1+0" +[[deps.JuliaSyntax]] +git-tree-sha1 = "e00e2b013f3bd98d3789f889b9305c1546ecd1ab" +uuid = "70703baa-626e-46a2-a12c-08ffd08c73b4" +version = "0.4.8" + [[deps.JuliaVariables]] deps = ["MLStyle", "NameResolution"] git-tree-sha1 = "49fb3cb53362ddadb4415e9b73926d6b40709e70" @@ -1143,26 +1160,21 @@ version = "0.2.0" [[deps.LibCURL]] deps = ["LibCURL_jll", "MozillaCACerts_jll"] uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" +version = "0.6.3" [[deps.LibCURL_jll]] deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.4.0+0" +version = "7.84.0+0" [[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" +version = "1.10.2+0" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" @@ -1260,6 +1272,12 @@ git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" version = "1.0.3" +[[deps.LoweredCodeUtils]] +deps = ["JuliaInterpreter"] +git-tree-sha1 = "38756922d32476c8f41f73560b910fc805a5a103" +uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" +version = "2.4.3" + [[deps.MKL_jll]] deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl"] git-tree-sha1 = "72dc3cf284559eb8f53aa593fe62cb33f83ed0c0" @@ -1333,7 +1351,7 @@ version = "1.1.9" [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" +version = "2.28.2+0" [[deps.Measures]] git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" @@ -1363,7 +1381,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" +version = "2022.10.11" [[deps.MuladdMacro]] git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" @@ -1455,6 +1473,12 @@ git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" version = "1.3.5+1" +[[deps.OhMyREPL]] +deps = ["Crayons", "JLFzf", "JuliaSyntax", "Markdown", "Pkg", "Printf", "REPL"] +git-tree-sha1 = "ac97616321d5c7a52904b54be766dca1514d2125" +uuid = "5fb14364-9ced-5910-84b2-373655c76a03" +version = "0.5.23" + [[deps.OneHotArrays]] deps = ["Adapt", "ChainRulesCore", "Compat", "GPUArraysCore", "LinearAlgebra", "NNlib"] git-tree-sha1 = "5e4029759e8699ec12ebdf8721e51a659443403c" @@ -1462,20 +1486,20 @@ uuid = "0b1bfda6-eb8a-41d2-88d8-f5af5cad476f" version = "0.2.4" [[deps.OpenBLAS32_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] -git-tree-sha1 = "6065c4cff8fee6c6770b277af45d5082baacdba1" +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "2fb9ee2dc14d555a6df2a714b86b7125178344c2" uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" -version = "0.3.24+0" +version = "0.3.21+0" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+2" +version = "0.3.21+4" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" +version = "0.8.1+0" [[deps.OpenMPI_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] @@ -1549,7 +1573,7 @@ version = "0.42.2+0" [[deps.Pkg]] deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" +version = "1.9.2" [[deps.PkgVersion]] deps = ["Pkg"] @@ -1608,10 +1632,10 @@ uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" version = "1.4.3" [[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterface", "ForwardDiff"] -git-tree-sha1 = "64bb68f76f789f5fe5930a80af310f19cdafeaed" +deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] +git-tree-sha1 = "01ac95fca7daabe77a9cb705862bd87016af9ddb" uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.17" +version = "0.4.13" [deps.PreallocationTools.extensions] PreallocationToolsReverseDiffExt = "ReverseDiff" @@ -1675,7 +1699,7 @@ uuid = "a01a1ee8-cea4-48fc-987c-fc7878d79da1" version = "0.10.0" [[deps.Random]] -deps = ["SHA"] +deps = ["SHA", "Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.Random123]] @@ -1719,10 +1743,10 @@ uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" version = "0.6.12" [[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "dd7fc1923fde0cc6cdff451352d17924b0704ca1" +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "SparseArrays", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "27ee1c03e732c488ecce1a25f0d7da9b5d936574" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "3.5.4" +version = "3.3.3" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsFastBroadcastExt = "FastBroadcast" @@ -1755,6 +1779,12 @@ git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" uuid = "ae029012-a4dd-5104-9daa-d747884805df" version = "1.3.0" +[[deps.Revise]] +deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] +git-tree-sha1 = "3fe4e5b9cdbb9bbc851c57b149e516acc07f8f72" +uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" +version = "3.5.13" + [[deps.RootSolvers]] deps = ["ForwardDiff"] git-tree-sha1 = "833d9914e748ca9329b762a82ec912897975f8d8" @@ -1864,7 +1894,6 @@ version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" [[deps.SparseInverseSubset]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] @@ -1924,7 +1953,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" +version = "1.9.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -1967,9 +1996,9 @@ deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.1+1" +version = "5.10.1+6" [[deps.SurfaceFluxes]] deps = ["CLIMAParameters", "DocStringExtensions", "RootSolvers", "Thermodynamics"] @@ -1978,9 +2007,9 @@ uuid = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f" version = "0.8.1" [[deps.SymbolicIndexingInterface]] -git-tree-sha1 = "74502f408d99fc217a9d7cd901d9ffe45af892b1" +git-tree-sha1 = "be414bfd80c2c91197823890c66ef4b74f5bf5fe" uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.3.3" +version = "0.3.1" [[deps.TOML]] deps = ["Dates"] @@ -2377,7 +2406,7 @@ version = "0.4.9" [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" +version = "1.2.13+0" [[deps.Zstd_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -2452,7 +2481,7 @@ version = "0.15.1+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" +version = "5.8.0+0" [[deps.libevdev_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] @@ -2493,12 +2522,12 @@ version = "1.1.6+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" +version = "1.48.0+0" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" +version = "17.4.0+0" [[deps.x264_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] diff --git a/experiments/AMIP/Project.toml b/experiments/AMIP/Project.toml index b31df1410..153ef2b95 100644 --- a/experiments/AMIP/Project.toml +++ b/experiments/AMIP/Project.toml @@ -28,11 +28,13 @@ Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" NVTX = "5da4648a-3479-48b8-97b9-01cb529c0a1f" +OhMyREPL = "5fb14364-9ced-5910-84b2-373655c76a03" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c" RRTMGP = "a01a1ee8-cea4-48fc-987c-fc7878d79da1" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" diff --git a/experiments/AMIP/components/atmosphere/climaatmos_init.jl b/experiments/AMIP/components/atmosphere/climaatmos_init.jl index 0e64f93ef..cb46bc1eb 100644 --- a/experiments/AMIP/components/atmosphere/climaatmos_init.jl +++ b/experiments/AMIP/components/atmosphere/climaatmos_init.jl @@ -98,8 +98,8 @@ function get_field(sim::ClimaAtmosSimulation, ::Val{:liquid_precipitation}) sim.integrator.p.precipitation.col_integrated_rain .* ρ_liq # kg/m^2/s end function get_field(sim::ClimaAtmosSimulation, ::Val{:snow_precipitation}) - ρ_liq = CAP.ρ_cloud_liq(sim.integrator.p.params) - sim.integrator.p.precipitation.col_integrated_snow .* ρ_liq # kg/m^2/s + ρ_ice = CAP.ρ_cloud_ice(sim.integrator.p.params) + sim.integrator.p.precipitation.col_integrated_snow .* ρ_ice # kg/m^2/s end get_field(sim::ClimaAtmosSimulation, ::Val{:turbulent_energy_flux}) = diff --git a/experiments/AMIP/components/land/bucket_utils.jl b/experiments/AMIP/components/land/bucket_utils.jl index 8b18215f0..8eb43a3ee 100644 --- a/experiments/AMIP/components/land/bucket_utils.jl +++ b/experiments/AMIP/components/land/bucket_utils.jl @@ -65,6 +65,7 @@ function update_field!(sim::BucketSimulation, ::Val{:liquid_precipitation}, fiel end function update_field!(sim::BucketSimulation, ::Val{:snow_precipitation}, field) ρ_liq = (LSMP.ρ_cloud_liq(sim.model.parameters.earth_param_set)) + ρ_ice = (LSMP.ρ_cloud_ice(sim.model.parameters.earth_param_set)) parent(sim.integrator.p.drivers.P_snow) .= parent(field ./ ρ_liq) end @@ -128,6 +129,7 @@ function get_field(bucket_sim::BucketSimulation, ::Val{:energy}) e_per_area .+= -LSMP.LH_f0(bucket_sim.model.parameters.earth_param_set) .* LSMP.ρ_cloud_liq(bucket_sim.model.parameters.earth_param_set) .* bucket_sim.integrator.u.bucket.σS + # LSMP.ρ_cloud_ice(bucket_sim.model.parameters.earth_param_set) .* bucket_sim.integrator.u.bucket.σS return e_per_area end diff --git a/experiments/AMIP/coupler_driver.jl b/experiments/AMIP/coupler_driver.jl index d1c932b6a..99e00d65c 100644 --- a/experiments/AMIP/coupler_driver.jl +++ b/experiments/AMIP/coupler_driver.jl @@ -777,6 +777,8 @@ if ClimaComms.iamroot(comms_ctx) ) ## plot data that correspond to the model's last save_hdf5 call (i.e., last month) end - ## clean up - rm(COUPLER_OUTPUT_DIR; recursive = true, force = true) + ## clean up for interactive runs, retain all output otherwise + if isinteractive() + rm(COUPLER_OUTPUT_DIR; recursive = true, force = true) + end end