diff --git a/docs/Manifest.toml b/docs/Manifest.toml index cab87c4085..dbb1f2bf68 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -327,9 +327,9 @@ weakdeps = ["Krylov"] [[deps.ClimaParams]] deps = ["DocStringExtensions", "TOML", "Test"] -git-tree-sha1 = "ec67949db856e01df4cbf7d6ddafefeda02f93ee" +git-tree-sha1 = "1a3d2455fff201bcf130bbd5a71ac16fc3c21fd1" uuid = "5c42b081-d73a-476f-9059-fd94b934656c" -version = "0.10.3" +version = "0.10.4" [[deps.ClimaTimeSteppers]] deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] diff --git a/examples/Manifest.toml b/examples/Manifest.toml index 51e740e1fe..e01d2271fe 100644 --- a/examples/Manifest.toml +++ b/examples/Manifest.toml @@ -345,9 +345,9 @@ version = "0.7.5" [[deps.ClimaParams]] deps = ["DocStringExtensions", "TOML", "Test"] -git-tree-sha1 = "ec67949db856e01df4cbf7d6ddafefeda02f93ee" +git-tree-sha1 = "1a3d2455fff201bcf130bbd5a71ac16fc3c21fd1" uuid = "5c42b081-d73a-476f-9059-fd94b934656c" -version = "0.10.3" +version = "0.10.4" [[deps.ClimaTimeSteppers]] deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] diff --git a/perf/Manifest.toml b/perf/Manifest.toml index c44db8c92b..8fd2b2b61f 100644 --- a/perf/Manifest.toml +++ b/perf/Manifest.toml @@ -354,9 +354,9 @@ version = "0.7.5" [[deps.ClimaParams]] deps = ["DocStringExtensions", "TOML", "Test"] -git-tree-sha1 = "ec67949db856e01df4cbf7d6ddafefeda02f93ee" +git-tree-sha1 = "1a3d2455fff201bcf130bbd5a71ac16fc3c21fd1" uuid = "5c42b081-d73a-476f-9059-fd94b934656c" -version = "0.10.3" +version = "0.10.4" [[deps.ClimaTimeSteppers]] deps = ["ClimaComms", "Colors", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "KernelAbstractions", "Krylov", "LinearAlgebra", "LinearOperators", "NVTX", "SciMLBase", "StaticArrays"] diff --git a/src/cache/surface_albedo.jl b/src/cache/surface_albedo.jl index faaba37e14..7c0c0137ce 100644 --- a/src/cache/surface_albedo.jl +++ b/src/cache/surface_albedo.jl @@ -9,7 +9,7 @@ struct CouplerAlbedo <: SurfaceAlbedoModel end A constant surface albedo model. The default value is 0.38. It is used purely for idealized experiments. """ Base.@kwdef struct ConstantAlbedo{FT} <: SurfaceAlbedoModel - α::FT = 0.38 + α::FT end """ diff --git a/src/parameters/Parameters.jl b/src/parameters/Parameters.jl index 7fe01793d1..b403c635f4 100644 --- a/src/parameters/Parameters.jl +++ b/src/parameters/Parameters.jl @@ -74,6 +74,9 @@ Base.@kwdef struct ClimaAtmosParameters{FT, TP, RP, IP, MPP, WP, SFP, TCP} <: zd_viscous::FT zd_rayleigh::FT kappa_2_sponge::FT + # Radiation + idealized_ocean_albedo::FT + water_refractive_index::FT end Base.eltype(::ClimaAtmosParameters{FT}) where {FT} = FT diff --git a/src/parameters/create_parameters.jl b/src/parameters/create_parameters.jl index f466cf1c74..73ae5b1adc 100644 --- a/src/parameters/create_parameters.jl +++ b/src/parameters/create_parameters.jl @@ -111,6 +111,8 @@ function create_parameter_set(config::AtmosConfig) :drag_layer_vertical_extent => :σ_b, :kappa_2_sponge => :kappa_2_sponge, :held_suarez_minimum_temperature => :T_min_hs, + :ocean_surface_albedo => :idealized_ocean_albedo, + :water_refractive_index => :water_refractive_index, ) parameters = CP.get_parameter_values(toml_dict, name_map, "ClimaAtmos") return CAP.ClimaAtmosParameters{FT, TP, RP, IP, MPP, WP, SFP, TCP}(; diff --git a/src/solver/model_getters.jl b/src/solver/model_getters.jl index 8482d56804..6a36fd4219 100644 --- a/src/solver/model_getters.jl +++ b/src/solver/model_getters.jl @@ -97,15 +97,15 @@ function get_surface_model(parsed_args) end end -function get_surface_albedo_model(parsed_args, ::Type{FT}) where {FT} +function get_surface_albedo_model(parsed_args, params, ::Type{FT}) where {FT} albedo_name = parsed_args["albedo_model"] return if albedo_name in ("ConstantAlbedo",) - ConstantAlbedo{FT}() + ConstantAlbedo{FT}(; α = params.idealized_ocean_albedo) elseif albedo_name in ("RegressionFunctionAlbedo",) isnothing(parsed_args["rad"]) && error( "Radiation model not specified, so cannot use RegressionFunctionAlbedo", ) - RegressionFunctionAlbedo{FT}() + RegressionFunctionAlbedo{FT}(; n = params.water_refractive_index) elseif albedo_name in ("CouplerAlbedo",) CouplerAlbedo() else diff --git a/src/solver/type_getters.jl b/src/solver/type_getters.jl index 5b103d442c..b41803d60b 100644 --- a/src/solver/type_getters.jl +++ b/src/solver/type_getters.jl @@ -86,7 +86,7 @@ function get_atmos(config::AtmosConfig, params) rayleigh_sponge = get_rayleigh_sponge_model(parsed_args, params, FT), sfc_temperature = get_sfc_temperature_form(parsed_args), surface_model = get_surface_model(parsed_args), - surface_albedo = get_surface_albedo_model(parsed_args, FT), + surface_albedo = get_surface_albedo_model(parsed_args, params, FT), numerics = get_numerics(parsed_args), ) @assert !@any_reltype(atmos, (UnionAll, DataType))