Skip to content

Commit

Permalink
Merge #2021
Browse files Browse the repository at this point in the history
2021: Remove parameters from config r=nefrathenrici a=nefrathenrici

## Content
- Removes the following config options: `C_E`, `alpha_rayleigh_w`, `alpha_rayleigh_uh`, `zd_viscous`, `zd_rayleigh`, `kappa_2_sponge`
- Instead of being set via config, these values are added to ClimaAtmosParameters via a SpongeParameters struct, except for `C_E`, which is at the top-level
- Add TOMLs for CI cases that need to change the values above. One file per case.
- Updates .dev manifest to 1.9.2
- Update juliaformatter to 1.9


Co-authored-by: nefrathenrici <nat.henrici@gmail.com>
  • Loading branch information
bors[bot] and nefrathenrici authored Aug 31, 2023
2 parents 934ca7b + bfb2a02 commit 8a8621f
Show file tree
Hide file tree
Showing 43 changed files with 214 additions and 77 deletions.
32 changes: 18 additions & 14 deletions .dev/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.8.5"
julia_version = "1.9.2"
manifest_format = "2.0"
project_hash = "b280bcf3b481823c97fa1a62c1b5e65114b8fa18"

Expand All @@ -27,15 +27,19 @@ uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6"
version = "0.8.12"

[[deps.Compat]]
deps = ["Dates", "LinearAlgebra", "UUIDs"]
deps = ["UUIDs"]
git-tree-sha1 = "e460f044ca8b99be31d35fe54fc33a5c33dd8ed7"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.9.0"
weakdeps = ["Dates", "LinearAlgebra"]

[deps.Compat.extensions]
CompatLinearAlgebraExt = "LinearAlgebra"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.1+0"
version = "1.0.5+0"

[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
Expand Down Expand Up @@ -104,7 +108,7 @@ version = "1.10.2+0"
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[deps.LinearAlgebra]]
deps = ["Libdl", "libblastrampoline_jll"]
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[deps.Logging]]
Expand All @@ -117,14 +121,14 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.0+0"
version = "2.28.2+0"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.2.1"
version = "2022.10.11"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
Expand All @@ -133,7 +137,7 @@ version = "1.2.0"
[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.20+0"
version = "0.3.21+4"

[[deps.OrderedCollections]]
git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3"
Expand All @@ -147,9 +151,9 @@ uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.7.2"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
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.8.0"
version = "1.9.2"

[[deps.PrecompileTools]]
deps = ["Preferences"]
Expand Down Expand Up @@ -188,12 +192,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.0"
version = "1.0.3"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.1"
version = "1.10.0"

[[deps.Tokenize]]
git-tree-sha1 = "90538bf898832b6ebd900fa40f223e695970e3a5"
Expand All @@ -215,12 +219,12 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.12+3"
version = "1.2.13+0"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.1.1+0"
version = "5.8.0+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/julia_formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: julia-actions/setup-julia@latest
if: steps.filter.outputs.julia_file_change == 'true'
with:
version: '1.8'
version: '1.9'

- name: Apply JuliaFormatter
if: steps.filter.outputs.julia_file_change == 'true'
Expand Down
19 changes: 0 additions & 19 deletions config/default_configs/default_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,22 +243,3 @@ prognostic_tke:
prognostic_surface:
help: "Determines if surface temperature is prognostic [`false` (default), , `true`, `PrognosticSurfaceTemperature`, `PrescribedSurfaceTemperature`]"
value: "false"
# Will be moved to ClimaParameters.jl
C_E:
help: "Bulk transfer coefficient"
value: 0.0044
alpha_rayleigh_w:
help: "Rayleigh sponge coefficient for vertical velocity"
value: 1.0
alpha_rayleigh_uh:
help: "Rayleigh sponge coefficient for horizontal velocity"
value: 0.0
zd_viscous:
help: "Viscous sponge height"
value: 15000.0
zd_rayleigh:
help: "Rayleigh sponge height"
value: 15000.0
kappa_2_sponge:
help: "Viscous sponge coefficient"
value: 1.0e6
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
rad: "clearsky"
dt_save_to_disk: "10days"
rayleigh_sponge: true
zd_rayleigh: 35000.0
z_elem: 50
dt: "150secs"
surface_setup: "DefaultMoninObukhov"
Expand All @@ -11,9 +10,9 @@ dz_bottom: 30.0
vert_diff: "true"
h_elem: 16
kappa_4: 1.0e16
alpha_rayleigh_w: 10.0
FLOAT_TYPE: "Float64"
z_max: 45000.0
precip_model: "0M"
job_id: "longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64"
moist: "equil"
toml: [toml/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.toml]
5 changes: 2 additions & 3 deletions config/longrun_configs/longrun_compressible_edmf_trmm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

config: "column"
FLOAT_TYPE: "Float64"
hyperdiff: "false"
Expand All @@ -12,7 +11,7 @@ z_elem: 90
z_stretch: false
z_max: 17000
rayleigh_sponge: true
zd_rayleigh: 15000
job_id: "longrun_compressible_edmf_trmm"
dt: "0.2secs"
t_end: "3.8hours"
t_end: "3.8hours"
toml: [longrun_compressible_edmf_trmm.toml]
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ kappa_4: 1.0e16
forcing: "held_suarez"
dt: "300secs"
rayleigh_sponge: true
zd_rayleigh: 35000.0
job_id: "longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km"
toml: [toml/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.toml]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ vert_diff: "true"
moist: "equil"
precip_model: "0M"
rayleigh_sponge: true
alpha_rayleigh_w: 10.0
zd_rayleigh: 35000.0
forcing: "held_suarez"
job_id: "longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km"
toml: [toml/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.toml]
2 changes: 1 addition & 1 deletion config/model_configs/bomex_box_rhoe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dt: "0.5secs"
surface_setup: "Bomex"
perturb_initstate: false
t_end: "600secs"
C_E: 0.044
y_max: 10000.0
z_stretch: false
vert_diff: "true"
Expand All @@ -17,3 +16,4 @@ z_max: 3000.0
ls_adv: "Bomex"
job_id: "bomex_box_rhoe"
moist: "equil"
toml: [toml/bomex_box_rhoe.toml]
2 changes: 1 addition & 1 deletion config/model_configs/edmf_trmm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FLOAT_TYPE: "Float64"
z_max: 16400.0
precip_model: "1M"
regression_test: true
alpha_rayleigh_uh: 0.0001
dt_save_to_sol: "5mins"
job_id: "edmf_trmm"
rad: "TRMM_LBA"
toml: [toml/edmf_trmm.toml]
2 changes: 1 addition & 1 deletion config/model_configs/edmfx_bomex_box_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ surface_setup: "Bomex"
perturb_initstate: false
edmfx_entr_detr: true
t_end: "10800secs"
C_E: 0.044
y_max: 100000.0
y_elem: 2
turbconv: "edmfx"
Expand All @@ -24,3 +23,4 @@ z_max: 3000.0
ls_adv: "Bomex"
job_id: "edmfx_bomex_box_v1"
moist: "equil"
toml: [toml/edmfx_bomex_box_v1.toml]
2 changes: 1 addition & 1 deletion config/model_configs/edmfx_bomex_box_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ surface_setup: "Bomex"
perturb_initstate: false
edmfx_entr_detr: true
t_end: "10800secs"
C_E: 0.044
y_max: 100000.0
y_elem: 2
turbconv: "edmfx"
Expand All @@ -25,3 +24,4 @@ z_max: 3000.0
ls_adv: "Bomex"
job_id: "edmfx_bomex_box_v2"
moist: "equil"
toml: [toml/edmfx_bomex_box_v2.toml]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dz_bottom: 200.0
use_reference_state: false
config: "plane"
kappa_4: 1.0e6
alpha_rayleigh_w: 0.1
z_max: 25000.0
topography: "Agnesi"
job_id: "plane_agnesi_mountain_test_stretched"
toml: [toml/plane_agnesi_mountain_test_stretched.toml]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ x_elem: 80
use_reference_state: false
config: "plane"
kappa_4: 1.0e6
alpha_rayleigh_w: 0.1
z_max: 25000.0
topography: "Agnesi"
job_id: "plane_agnesi_mountain_test_uniform"
toml: [toml/plane_agnesi_mountain_test_uniform.toml]
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use_reference_state: false
ode_algo: "SSP33ShuOsher"
config: "plane"
kappa_4: 5.0e7
alpha_rayleigh_w: 0.1
z_max: 25000.0
topography: "Schar"
job_id: "plane_schar_mountain_test_stretched"
toml: [toml/plane_schar_mountain_test_stretched.toml]
2 changes: 1 addition & 1 deletion config/model_configs/plane_schar_mountain_test_uniform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use_reference_state: false
ode_algo: "SSP33ShuOsher"
config: "plane"
kappa_4: 5.0e7
alpha_rayleigh_w: 0.1
z_max: 25000.0
topography: "Schar"
job_id: "plane_schar_mountain_test_uniform"
toml: [toml/plane_schar_mountain_test_uniform.toml]
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
rad: "allskywithclear"
dt_save_to_disk: "18hours"
rayleigh_sponge: true
zd_rayleigh: 30000.0
orographic_gravity_wave: "raw_topo"
z_elem: 25
dt: "400secs"
Expand All @@ -17,3 +16,4 @@ regression_test: true
surface_temperature: "ZonallyAsymmetric"
job_id: "sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric"
moist: "equil"
toml: [toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.toml]
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
rad: "allskywithclear"
dt_save_to_disk: "18hours"
rayleigh_sponge: true
zd_rayleigh: 30000.0
orographic_gravity_wave: "gfdl_restart"
z_elem: 25
dt: "400secs"
Expand All @@ -16,3 +15,4 @@ precip_model: "0M"
regression_test: true
job_id: "sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res"
moist: "equil"
toml: [toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml]
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
dt_save_to_disk: "4days"
rayleigh_sponge: true
zd_rayleigh: 30000.0
zd_viscous: 30000.0
dt: "450secs"
z_elem: 25
t_end: "4days"
Expand All @@ -14,3 +12,4 @@ regression_test: true
viscous_sponge: true
job_id: "sphere_held_suarez_rhoe_equilmoist_hightop_sponge"
moist: "equil"
toml: [toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml]
2 changes: 1 addition & 1 deletion config/perf_configs/flame/perf_gw.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
rad: "allskywithclear"
rayleigh_sponge: true
zd_rayleigh: 30000.0
orographic_gravity_wave: "raw_topo"
z_elem: 25
dt: "1secs"
Expand All @@ -14,3 +13,4 @@ z_max: 45000.0
precip_model: "0M"
job_id: "flame_perf_gw"
moist: "equil"
toml: [toml/flame_perf_gw.toml]
4 changes: 2 additions & 2 deletions perf/flame.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ allocs_limit = Dict()
allocs_limit["flame_perf_target"] = 4384
allocs_limit["flame_perf_target_tracers"] = 204016
allocs_limit["flame_perf_target_edmfx"] = 298688
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 663952
allocs_limit["flame_perf_target_edmf"] = 8270517072
allocs_limit["flame_perf_target_diagnostic_edmfx"] = 664336
allocs_limit["flame_perf_target_edmf"] = 8282903376
allocs_limit["flame_perf_target_threaded"] = 6175664
allocs_limit["flame_perf_target_callbacks"] = 49850536
allocs_limit["flame_perf_gw"] = 4937136096
Expand Down
2 changes: 1 addition & 1 deletion regression_tests/ref_counter.jl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
121
122
18 changes: 17 additions & 1 deletion src/parameters/Parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const ACAP = AbstractClimaAtmosParameters

Base.broadcastable(param_set::ACAP) = tuple(param_set)

Base.@kwdef struct ClimaAtmosParameters{FT, TP, RP, IP, MPP, SFP, TCP} <: ACAP
Base.@kwdef struct ClimaAtmosParameters{FT, TP, RP, IP, MPP, SFP, TCP, SP} <:
ACAP
Omega::FT
f_plane_coriolis_frequency::FT
planet_radius::FT
Expand All @@ -26,11 +27,26 @@ Base.@kwdef struct ClimaAtmosParameters{FT, TP, RP, IP, MPP, SFP, TCP} <: ACAP
microphysics_params::MPP
surfacefluxes_params::SFP
turbconv_params::TCP
sponge_params::SP
entr_coeff::FT = 1
detr_coeff::FT = 0.001
# TODO: Figure out a better place for these held-suarez parameters
ΔT_y_dry::FT
ΔT_y_wet::FT
C_E::FT
end

"""
SpongeParameters{FT}
Parameters for both the viscous and rayleigh sponge.
"""
Base.@kwdef struct SpongeParameters{FT}
alpha_rayleigh_w::FT
alpha_rayleigh_uh::FT
zd_viscous::FT
zd_rayleigh::FT
kappa_2_sponge::FT
end

Base.eltype(::ClimaAtmosParameters{FT}) where {FT} = FT
Expand Down
Loading

0 comments on commit 8a8621f

Please sign in to comment.