From fb387713ad7cd7ae89439ef3748a63ad257979fb Mon Sep 17 00:00:00 2001 From: Anna Jaruga Date: Thu, 31 Aug 2023 20:23:48 -0700 Subject: [PATCH] update Thermodynamics, CloudMicrophysics and SurfaceFluxes --- Project.toml | 6 +++--- docs/Manifest.toml | 16 ++++++++-------- examples/Manifest.toml | 16 ++++++++-------- perf/Manifest.toml | 16 ++++++++-------- .../microphysics/precipitation.jl | 3 +++ src/parameters/create_parameters.jl | 11 ++++++++++- 6 files changed, 40 insertions(+), 28 deletions(-) diff --git a/Project.toml b/Project.toml index 28db3c3ad36..ea598b1fe5d 100644 --- a/Project.toml +++ b/Project.toml @@ -56,7 +56,7 @@ CUDA = "4" ClimaComms = "0.5" ClimaCore = "0.10" ClimaTimeSteppers = "0.7" -CloudMicrophysics = "0.10" +CloudMicrophysics = "0.13" Colors = "0.12" Dierckx = "0.5" DiffEqBase = "6" @@ -78,9 +78,9 @@ RRTMGP = "0.9" RootSolvers = "0.2, 0.3" StaticArrays = "1" StatsBase = "0.33" -SurfaceFluxes = "0.6" +SurfaceFluxes = "0.7" TerminalLoggers = "0.1" -Thermodynamics = "0.10" +Thermodynamics = "0.11" YAML = "0.4" julia = "1.7" diff --git a/docs/Manifest.toml b/docs/Manifest.toml index 9e1e039055d..5ca4514b03e 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -277,10 +277,10 @@ uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.12" [[deps.CloudMicrophysics]] -deps = ["DocStringExtensions", "SpecialFunctions", "Thermodynamics"] -git-tree-sha1 = "8e98d1f3ffb1e2171bf472afcedfd77f74e85026" +deps = ["CLIMAParameters", "DocStringExtensions", "ForwardDiff", "KernelAbstractions", "NonlinearSolve", "SpecialFunctions", "Thermodynamics"] +git-tree-sha1 = "b9e41fe99cb337f9ca0bd8bf5f62d76d33273669" uuid = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b" -version = "0.10.3" +version = "0.13.2" [[deps.ColorTypes]] deps = ["FixedPointNumbers", "Random"] @@ -1631,10 +1631,10 @@ uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" version = "5.10.1+6" [[deps.SurfaceFluxes]] -deps = ["DocStringExtensions", "KernelAbstractions", "RootSolvers", "StaticArrays", "Thermodynamics"] -git-tree-sha1 = "d6a2fc6e439c8cef9d0c04a0929090bb2218ba85" +deps = ["DocStringExtensions", "KernelAbstractions", "Logging", "RootSolvers", "StaticArrays", "Thermodynamics"] +git-tree-sha1 = "74972e5395caa7be35b767cd847fbbde980c2965" uuid = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f" -version = "0.6.3" +version = "0.7.1" [[deps.SymbolicIndexingInterface]] deps = ["DocStringExtensions"] @@ -1699,9 +1699,9 @@ version = "1.0.1" [[deps.Thermodynamics]] deps = ["DocStringExtensions", "KernelAbstractions", "Random", "RootSolvers"] -git-tree-sha1 = "dd055cd2ef16f8d373a7dc833f4ddf72165524c5" +git-tree-sha1 = "ac3b5236da4d028b9a3984ae7b28730d46892dbf" uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" -version = "0.10.2" +version = "0.11.0" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] diff --git a/examples/Manifest.toml b/examples/Manifest.toml index b0feadce4cc..009cc978510 100644 --- a/examples/Manifest.toml +++ b/examples/Manifest.toml @@ -346,10 +346,10 @@ uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.12" [[deps.CloudMicrophysics]] -deps = ["DocStringExtensions", "SpecialFunctions", "Thermodynamics"] -git-tree-sha1 = "8e98d1f3ffb1e2171bf472afcedfd77f74e85026" +deps = ["CLIMAParameters", "DocStringExtensions", "ForwardDiff", "KernelAbstractions", "NonlinearSolve", "SpecialFunctions", "Thermodynamics"] +git-tree-sha1 = "b9e41fe99cb337f9ca0bd8bf5f62d76d33273669" uuid = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b" -version = "0.10.3" +version = "0.13.2" [[deps.CodeTracking]] deps = ["InteractiveUtils", "UUIDs"] @@ -2458,10 +2458,10 @@ uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" version = "5.10.1+6" [[deps.SurfaceFluxes]] -deps = ["DocStringExtensions", "KernelAbstractions", "RootSolvers", "StaticArrays", "Thermodynamics"] -git-tree-sha1 = "d6a2fc6e439c8cef9d0c04a0929090bb2218ba85" +deps = ["DocStringExtensions", "KernelAbstractions", "Logging", "RootSolvers", "StaticArrays", "Thermodynamics"] +git-tree-sha1 = "74972e5395caa7be35b767cd847fbbde980c2965" uuid = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f" -version = "0.6.3" +version = "0.7.1" [[deps.SymbolicIndexingInterface]] deps = ["DocStringExtensions"] @@ -2530,9 +2530,9 @@ version = "1.0.1" [[deps.Thermodynamics]] deps = ["DocStringExtensions", "KernelAbstractions", "Random", "RootSolvers"] -git-tree-sha1 = "dd055cd2ef16f8d373a7dc833f4ddf72165524c5" +git-tree-sha1 = "ac3b5236da4d028b9a3984ae7b28730d46892dbf" uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" -version = "0.10.2" +version = "0.11.0" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] diff --git a/perf/Manifest.toml b/perf/Manifest.toml index 6873b42f05f..11df77aad37 100644 --- a/perf/Manifest.toml +++ b/perf/Manifest.toml @@ -357,10 +357,10 @@ uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" version = "0.1.12" [[deps.CloudMicrophysics]] -deps = ["DocStringExtensions", "SpecialFunctions", "Thermodynamics"] -git-tree-sha1 = "8e98d1f3ffb1e2171bf472afcedfd77f74e85026" +deps = ["CLIMAParameters", "DocStringExtensions", "ForwardDiff", "KernelAbstractions", "NonlinearSolve", "SpecialFunctions", "Thermodynamics"] +git-tree-sha1 = "b9e41fe99cb337f9ca0bd8bf5f62d76d33273669" uuid = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b" -version = "0.10.3" +version = "0.13.2" [[deps.CodeTracking]] deps = ["InteractiveUtils", "UUIDs"] @@ -2505,10 +2505,10 @@ uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" version = "5.10.1+6" [[deps.SurfaceFluxes]] -deps = ["DocStringExtensions", "KernelAbstractions", "RootSolvers", "StaticArrays", "Thermodynamics"] -git-tree-sha1 = "d6a2fc6e439c8cef9d0c04a0929090bb2218ba85" +deps = ["DocStringExtensions", "KernelAbstractions", "Logging", "RootSolvers", "StaticArrays", "Thermodynamics"] +git-tree-sha1 = "74972e5395caa7be35b767cd847fbbde980c2965" uuid = "49b00bb7-8bd4-4f2b-b78c-51cd0450215f" -version = "0.6.3" +version = "0.7.1" [[deps.SymbolicIndexingInterface]] deps = ["DocStringExtensions"] @@ -2577,9 +2577,9 @@ version = "1.0.1" [[deps.Thermodynamics]] deps = ["DocStringExtensions", "KernelAbstractions", "Random", "RootSolvers"] -git-tree-sha1 = "dd055cd2ef16f8d373a7dc833f4ddf72165524c5" +git-tree-sha1 = "ac3b5236da4d028b9a3984ae7b28730d46892dbf" uuid = "b60c26fb-14c3-4610-9d3e-2d17fe7ff00c" -version = "0.10.2" +version = "0.11.0" [[deps.ThreadingUtilities]] deps = ["ManualMemory"] diff --git a/src/parameterized_tendencies/microphysics/precipitation.jl b/src/parameterized_tendencies/microphysics/precipitation.jl index e3f795bb44d..b80d3506d8f 100644 --- a/src/parameterized_tendencies/microphysics/precipitation.jl +++ b/src/parameterized_tendencies/microphysics/precipitation.jl @@ -319,6 +319,7 @@ function precipitation_advection_tendency!( microphys_params = CAP.microphysics_params(params) rain_type = CM.CommonTypes.RainType() snow_type = CM.CommonTypes.SnowType() + velo_type = CM.CommonTypes.Blk1MVelType() # TODO - some positivity limiters are needed @@ -331,6 +332,7 @@ function precipitation_advection_tendency!( ρq_rai * CM1.terminal_velocity( microphys_params, rain_type, + velo_type, ρ_c, ρq_rai / ρ_c, ), @@ -344,6 +346,7 @@ function precipitation_advection_tendency!( ρq_sno * CM1.terminal_velocity( microphys_params, snow_type, + velo_type, ρ_c, ρq_sno / ρ_c, ), diff --git a/src/parameters/create_parameters.jl b/src/parameters/create_parameters.jl index 354b6fbe27f..8a6a28db9a1 100644 --- a/src/parameters/create_parameters.jl +++ b/src/parameters/create_parameters.jl @@ -34,13 +34,22 @@ function create_climaatmos_parameter_set( thermo_params = TD.Parameters.ThermodynamicsParameters{FTD}(; pairs...) TP = typeof(thermo_params) + aliases = string.(fieldnames(CM.Parameters.ModalNucleationParameters)) + pairs = CP.get_parameter_values!(toml_dict, aliases, "CloudMicrophysics") + pairs = override_climaatmos_defaults((; pairs...), overrides) + modal_nucleation_params = + CM.Parameters.ModalNucleationParameters{FTD}(; pairs...) + MNP = typeof(modal_nucleation_params) + aliases = string.(fieldnames(CM.Parameters.CloudMicrophysicsParameters)) aliases = setdiff(aliases, ["thermo_params"]) + aliases = setdiff(aliases, ["modal_nuc_params"]) pairs = CP.get_parameter_values!(toml_dict, aliases, "CloudMicrophysics") pairs = override_climaatmos_defaults((; pairs...), overrides) - microphys_params = CM.Parameters.CloudMicrophysicsParameters{FTD, TP}(; + microphys_params = CM.Parameters.CloudMicrophysicsParameters{FTD, TP, MNP}(; pairs..., thermo_params, + modal_nucleation_params, ) MP = typeof(microphys_params)