From b44f9e74f2ee0ce2328bd3fbac2898b20936200f Mon Sep 17 00:00:00 2001 From: nefrathenrici Date: Fri, 25 Aug 2023 11:45:22 -0700 Subject: [PATCH 1/3] Remove params from config, add TOMLs for overrides --- .dev/Manifest.toml | 32 +++++++++++-------- .github/workflows/julia_formatter.yml | 2 +- config/default_configs/default_config.yml | 19 ----------- ...y_highres_hightop_rayleigh35e3_float64.yml | 3 +- .../longrun_compressible_edmf_trmm.yml | 5 ++- .../longrun_hs_rhoe_dry_nz63_55km_rs35km.yml | 2 +- ...hs_rhoe_equilmoist_nz63_0M_55km_rs35km.yml | 3 +- config/model_configs/bomex_box_rhoe.yml | 2 +- config/model_configs/edmf_trmm.yml | 2 +- config/model_configs/edmfx_bomex_box_v1.yml | 2 +- config/model_configs/edmfx_bomex_box_v2.yml | 2 +- .../plane_agnesi_mountain_test_stretched.yml | 2 +- .../plane_agnesi_mountain_test_uniform.yml | 2 +- .../plane_schar_mountain_test_stretched.yml | 2 +- .../plane_schar_mountain_test_uniform.yml | 2 +- ...lmoist_allsky_gw_raw_zonallyasymmetric.yml | 2 +- ...uaplanet_rhoe_equilmoist_allsky_gw_res.yml | 2 +- ..._suarez_rhoe_equilmoist_hightop_sponge.yml | 3 +- config/perf_configs/flame/perf_gw.yml | 2 +- src/parameters/Parameters.jl | 18 ++++++++++- src/parameters/create_parameters.jl | 13 +++++++- src/solver/model_getters.jl | 29 ++++++++++------- src/solver/type_getters.jl | 20 +++++++++--- toml/bomex_box_rhoe.toml | 5 +++ toml/edmf_trmm.toml | 5 +++ toml/edmfx_bomex_box_v1.toml | 5 +++ toml/edmfx_bomex_box_v2.toml | 5 +++ toml/flame_perf_gw.toml | 4 +++ ..._highres_hightop_rayleigh35e3_float64.toml | 10 ++++++ toml/longrun_compressible_edmf_trmm.toml | 5 +++ .../longrun_hs_rhoe_dry_nz63_55km_rs35km.toml | 5 +++ ...uilmoist_highres_hightop_rayleigh30e3.toml | 10 ++++++ ...s_rhoe_equilmoist_nz63_0M_55km_rs35km.toml | 10 ++++++ .../plane_agnesi_mountain_test_stretched.toml | 5 +++ toml/plane_agnesi_mountain_test_uniform.toml | 5 +++ toml/plane_schar_mountain_test_stretched.toml | 5 +++ toml/plane_schar_mountain_test_uniform.toml | 5 +++ ...moist_allsky_gw_raw_zonallyasymmetric.toml | 5 +++ ...aplanet_rhoe_equilmoist_allsky_gw_res.toml | 5 +++ ...suarez_rhoe_equilmoist_hightop_sponge.toml | 10 ++++++ ...suarez_rhoe_equilmoist_hightop_sponge.toml | 10 ++++++ 41 files changed, 211 insertions(+), 74 deletions(-) create mode 100644 toml/bomex_box_rhoe.toml create mode 100644 toml/edmf_trmm.toml create mode 100644 toml/edmfx_bomex_box_v1.toml create mode 100644 toml/edmfx_bomex_box_v2.toml create mode 100644 toml/flame_perf_gw.toml create mode 100644 toml/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.toml create mode 100644 toml/longrun_compressible_edmf_trmm.toml create mode 100644 toml/longrun_hs_rhoe_dry_nz63_55km_rs35km.toml create mode 100644 toml/longrun_hs_rhoe_equilmoist_highres_hightop_rayleigh30e3.toml create mode 100644 toml/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.toml create mode 100644 toml/plane_agnesi_mountain_test_stretched.toml create mode 100644 toml/plane_agnesi_mountain_test_uniform.toml create mode 100644 toml/plane_schar_mountain_test_stretched.toml create mode 100644 toml/plane_schar_mountain_test_uniform.toml create mode 100644 toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.toml create mode 100644 toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml create mode 100644 toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml create mode 100644 toml/sphere_ssp_first_tracer_energy_upwind_held_suarez_rhoe_equilmoist_hightop_sponge.toml diff --git a/.dev/Manifest.toml b/.dev/Manifest.toml index 55e29357911..1bd47e53105 100644 --- a/.dev/Manifest.toml +++ b/.dev/Manifest.toml @@ -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" @@ -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" @@ -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]] @@ -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" @@ -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" @@ -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"] @@ -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" @@ -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"] diff --git a/.github/workflows/julia_formatter.yml b/.github/workflows/julia_formatter.yml index 706dd84f501..2dae8be05d3 100644 --- a/.github/workflows/julia_formatter.yml +++ b/.github/workflows/julia_formatter.yml @@ -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' diff --git a/config/default_configs/default_config.yml b/config/default_configs/default_config.yml index d41abfafe31..68a29152405 100644 --- a/config/default_configs/default_config.yml +++ b/config/default_configs/default_config.yml @@ -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 diff --git a/config/longrun_configs/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.yml b/config/longrun_configs/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.yml index 5d22c995683..7e74f8c3fdf 100644 --- a/config/longrun_configs/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.yml +++ b/config/longrun_configs/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.yml @@ -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" @@ -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] diff --git a/config/longrun_configs/longrun_compressible_edmf_trmm.yml b/config/longrun_configs/longrun_compressible_edmf_trmm.yml index 0d858773ee4..7fcaac0c345 100644 --- a/config/longrun_configs/longrun_compressible_edmf_trmm.yml +++ b/config/longrun_configs/longrun_compressible_edmf_trmm.yml @@ -1,4 +1,3 @@ - config: "column" FLOAT_TYPE: "Float64" hyperdiff: "false" @@ -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" \ No newline at end of file +t_end: "3.8hours" +toml: [longrun_compressible_edmf_trmm.toml] diff --git a/config/longrun_configs/longrun_hs_rhoe_dry_nz63_55km_rs35km.yml b/config/longrun_configs/longrun_hs_rhoe_dry_nz63_55km_rs35km.yml index 7fc5a161e19..2b855133eb8 100644 --- a/config/longrun_configs/longrun_hs_rhoe_dry_nz63_55km_rs35km.yml +++ b/config/longrun_configs/longrun_hs_rhoe_dry_nz63_55km_rs35km.yml @@ -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] diff --git a/config/longrun_configs/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.yml b/config/longrun_configs/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.yml index 96107aabe91..0be31066aaf 100644 --- a/config/longrun_configs/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.yml +++ b/config/longrun_configs/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.yml @@ -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] diff --git a/config/model_configs/bomex_box_rhoe.yml b/config/model_configs/bomex_box_rhoe.yml index cd522c6bc27..ede4276567d 100644 --- a/config/model_configs/bomex_box_rhoe.yml +++ b/config/model_configs/bomex_box_rhoe.yml @@ -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" @@ -17,3 +16,4 @@ z_max: 3000.0 ls_adv: "Bomex" job_id: "bomex_box_rhoe" moist: "equil" +toml: [toml/bomex_box_rhoe.toml] diff --git a/config/model_configs/edmf_trmm.yml b/config/model_configs/edmf_trmm.yml index ac278104c44..8e0d1eaa028 100644 --- a/config/model_configs/edmf_trmm.yml +++ b/config/model_configs/edmf_trmm.yml @@ -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] diff --git a/config/model_configs/edmfx_bomex_box_v1.yml b/config/model_configs/edmfx_bomex_box_v1.yml index a00528c85ae..b6f76f61aef 100644 --- a/config/model_configs/edmfx_bomex_box_v1.yml +++ b/config/model_configs/edmfx_bomex_box_v1.yml @@ -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" @@ -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] diff --git a/config/model_configs/edmfx_bomex_box_v2.yml b/config/model_configs/edmfx_bomex_box_v2.yml index fababeec1c8..b812875c63a 100644 --- a/config/model_configs/edmfx_bomex_box_v2.yml +++ b/config/model_configs/edmfx_bomex_box_v2.yml @@ -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" @@ -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] diff --git a/config/model_configs/plane_agnesi_mountain_test_stretched.yml b/config/model_configs/plane_agnesi_mountain_test_stretched.yml index 6f908628c4b..55bfc259776 100644 --- a/config/model_configs/plane_agnesi_mountain_test_stretched.yml +++ b/config/model_configs/plane_agnesi_mountain_test_stretched.yml @@ -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] diff --git a/config/model_configs/plane_agnesi_mountain_test_uniform.yml b/config/model_configs/plane_agnesi_mountain_test_uniform.yml index bb6e0ff5044..8c888b62090 100644 --- a/config/model_configs/plane_agnesi_mountain_test_uniform.yml +++ b/config/model_configs/plane_agnesi_mountain_test_uniform.yml @@ -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] diff --git a/config/model_configs/plane_schar_mountain_test_stretched.yml b/config/model_configs/plane_schar_mountain_test_stretched.yml index 1e6890b6f45..32491e9a528 100644 --- a/config/model_configs/plane_schar_mountain_test_stretched.yml +++ b/config/model_configs/plane_schar_mountain_test_stretched.yml @@ -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] diff --git a/config/model_configs/plane_schar_mountain_test_uniform.yml b/config/model_configs/plane_schar_mountain_test_uniform.yml index f627e30234e..c87b9641354 100644 --- a/config/model_configs/plane_schar_mountain_test_uniform.yml +++ b/config/model_configs/plane_schar_mountain_test_uniform.yml @@ -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] diff --git a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml index 2ac2bb11bfe..120abb0af9f 100644 --- a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml +++ b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.yml @@ -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" @@ -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] diff --git a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml index d1a07a1db0a..5e546d00705 100644 --- a/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml +++ b/config/model_configs/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.yml @@ -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" @@ -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] diff --git a/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml b/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml index 5c8defe7925..466b9944dfb 100644 --- a/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml +++ b/config/model_configs/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.yml @@ -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" @@ -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] diff --git a/config/perf_configs/flame/perf_gw.yml b/config/perf_configs/flame/perf_gw.yml index ccfe571f298..9016c0b16b2 100644 --- a/config/perf_configs/flame/perf_gw.yml +++ b/config/perf_configs/flame/perf_gw.yml @@ -1,6 +1,5 @@ rad: "allskywithclear" rayleigh_sponge: true -zd_rayleigh: 30000.0 orographic_gravity_wave: "raw_topo" z_elem: 25 dt: "1secs" @@ -14,3 +13,4 @@ z_max: 45000.0 precip_model: "0M" job_id: "flame_perf_gw" moist: "equil" +toml: [toml/flame_perf_gw.toml] diff --git a/src/parameters/Parameters.jl b/src/parameters/Parameters.jl index 26b5234410b..022bffe3331 100644 --- a/src/parameters/Parameters.jl +++ b/src/parameters/Parameters.jl @@ -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 @@ -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 diff --git a/src/parameters/create_parameters.jl b/src/parameters/create_parameters.jl index 79331f6f40f..74625c36436 100644 --- a/src/parameters/create_parameters.jl +++ b/src/parameters/create_parameters.jl @@ -98,7 +98,15 @@ function create_climaatmos_parameter_set( pairs = CP.get_parameter_values!( toml_dict, - ["Omega", "planet_radius", "astro_unit", "ΔT_y_dry", "ΔT_y_wet"], + ["alpha_rayleigh_w", "alpha_rayleigh_uh", "zd_viscous", "zd_rayleigh", "kappa_2_sponge"], + ) + pairs = (; pairs...) # convert to NamedTuple + pairs = override_climaatmos_defaults((; pairs...), overrides) + sponge_params = CAP.SpongeParameters(; pairs...) + + pairs = CP.get_parameter_values!( + toml_dict, + ["Omega", "planet_radius", "astro_unit", "ΔT_y_dry", "ΔT_y_wet", "C_E"], "ClimaAtmos", ) pairs = (; pairs...) # convert to NamedTuple @@ -123,6 +131,8 @@ function create_climaatmos_parameter_set( detr_coeff = FTD(parsed_args["detr_coeff"]), ΔT_y_dry = FTD(pairs.ΔT_y_dry), ΔT_y_wet = FTD(pairs.ΔT_y_wet), + C_E = FTD(pairs.C_E), + sponge_params ) # logfilepath = joinpath(@__DIR__, "logfilepath_$FT.toml") # CP.log_parameter_information(toml_dict, logfilepath) @@ -134,6 +144,7 @@ function create_parameter_set(config::AtmosConfig) (; toml_dict, parsed_args) = config FT = eltype(config) dt = FT(CA.time_to_seconds(parsed_args["dt"])) + return if CA.is_column_edmf(parsed_args) overrides = (; MSLP = 100000.0, τ_precip = dt) create_climaatmos_parameter_set(toml_dict, parsed_args, overrides) diff --git a/src/solver/model_getters.jl b/src/solver/model_getters.jl index 20d4449d8cf..ef72dc28816 100644 --- a/src/solver/model_getters.jl +++ b/src/solver/model_getters.jl @@ -50,14 +50,14 @@ end function get_vertical_diffusion_model( diffuse_momentum, parsed_args, + params, ::Type{FT}, ) where {FT} vert_diff_name = parsed_args["vert_diff"] return if vert_diff_name in ("false", false, "none") nothing elseif vert_diff_name in ("true", true, "VerticalDiffusion") - C_E = FT(parsed_args["C_E"]) - VerticalDiffusion{diffuse_momentum, FT}(; C_E) + VerticalDiffusion{diffuse_momentum, FT}(; C_E = params.C_E) else error("Uncaught diffusion model `$vert_diff_name`.") end @@ -76,30 +76,35 @@ function get_surface_model(parsed_args) end end -function get_viscous_sponge_model(parsed_args, ::Type{FT}) where {FT} +function get_viscous_sponge_model( + parsed_args, + sponge_params, + ::Type{FT}, +) where {FT} vs_name = parsed_args["viscous_sponge"] return if vs_name in ("false", false, "none") nothing elseif vs_name in ("true", true, "ViscousSponge") - zd = parsed_args["zd_viscous"] - κ₂ = parsed_args["kappa_2_sponge"] + zd = sponge_params.zd_viscous + κ₂ = sponge_params.kappa_2_sponge ViscousSponge{FT}(; zd, κ₂) else error("Uncaught viscous sponge model `$vs_name`.") end end -function get_rayleigh_sponge_model(parsed_args, ::Type{FT}) where {FT} +function get_rayleigh_sponge_model( + parsed_args, + sponge_params, + ::Type{FT}, +) where {FT} rs_name = parsed_args["rayleigh_sponge"] return if rs_name in ("false", false) nothing elseif rs_name in ("true", true, "RayleighSponge") - zd = parsed_args["zd_rayleigh"] - α_uₕ = parsed_args["alpha_rayleigh_uh"] - α_w = parsed_args["alpha_rayleigh_w"] - isnothing(zd) && (zd = FT(15e3)) - isnothing(α_uₕ) && (α_uₕ = FT(1e-4)) - isnothing(α_w) && (α_w = FT(1)) + zd = sponge_params.zd_rayleigh + α_uₕ = sponge_params.alpha_rayleigh_uh + α_w = sponge_params.alpha_rayleigh_w RayleighSponge{FT}(; zd, α_uₕ, α_w) else error("Uncaught rayleigh sponge model `$rs_name`.") diff --git a/src/solver/type_getters.jl b/src/solver/type_getters.jl index 459dfc57589..bd1cb42bb3a 100644 --- a/src/solver/type_getters.jl +++ b/src/solver/type_getters.jl @@ -13,7 +13,8 @@ import OrdinaryDiffEq as ODE import ClimaTimeSteppers as CTS import DiffEqCallbacks as DEQ -function get_atmos(config::AtmosConfig, turbconv_params) +function get_atmos(config::AtmosConfig, params) + (; turbconv_params, sponge_params) = params (; parsed_args) = config FT = eltype(config) moisture_model = get_moisture_model(parsed_args) @@ -36,7 +37,8 @@ function get_atmos(config::AtmosConfig, turbconv_params) @assert edmfx_nh_pressure in (false, true) model_config = get_model_config(parsed_args) - vert_diff = get_vertical_diffusion_model(diffuse_momentum, parsed_args, FT) + vert_diff = + get_vertical_diffusion_model(diffuse_momentum, parsed_args, params, FT) atmos = AtmosModel(; moisture_model, model_config, @@ -70,8 +72,16 @@ function get_atmos(config::AtmosConfig, turbconv_params) ), hyperdiff = get_hyperdiffusion_model(parsed_args, FT), vert_diff, - viscous_sponge = get_viscous_sponge_model(parsed_args, FT), - rayleigh_sponge = get_rayleigh_sponge_model(parsed_args, FT), + viscous_sponge = get_viscous_sponge_model( + parsed_args, + sponge_params, + FT, + ), + rayleigh_sponge = get_rayleigh_sponge_model( + parsed_args, + sponge_params, + FT, + ), sfc_temperature = get_sfc_temperature_form(parsed_args), surface_model = get_surface_model(parsed_args), ) @@ -688,7 +698,7 @@ end function get_integrator(config::AtmosConfig) params = create_parameter_set(config) - atmos = get_atmos(config, params.turbconv_params) + atmos = get_atmos(config, params) numerics = get_numerics(config.parsed_args) simulation = get_simulation(config, config.comms_ctx) initial_condition = get_initial_condition(config.parsed_args) diff --git a/toml/bomex_box_rhoe.toml b/toml/bomex_box_rhoe.toml new file mode 100644 index 00000000000..3da20f5a66b --- /dev/null +++ b/toml/bomex_box_rhoe.toml @@ -0,0 +1,5 @@ +[C_E] +alias = "C_E" +value = 0.044 +type = "float" + diff --git a/toml/edmf_trmm.toml b/toml/edmf_trmm.toml new file mode 100644 index 00000000000..a941cbf18ea --- /dev/null +++ b/toml/edmf_trmm.toml @@ -0,0 +1,5 @@ +[alpha_rayleigh_uh] +alias = "alpha_rayleigh_uh" +value = 0.0001 +type = "float" + diff --git a/toml/edmfx_bomex_box_v1.toml b/toml/edmfx_bomex_box_v1.toml new file mode 100644 index 00000000000..3da20f5a66b --- /dev/null +++ b/toml/edmfx_bomex_box_v1.toml @@ -0,0 +1,5 @@ +[C_E] +alias = "C_E" +value = 0.044 +type = "float" + diff --git a/toml/edmfx_bomex_box_v2.toml b/toml/edmfx_bomex_box_v2.toml new file mode 100644 index 00000000000..3da20f5a66b --- /dev/null +++ b/toml/edmfx_bomex_box_v2.toml @@ -0,0 +1,5 @@ +[C_E] +alias = "C_E" +value = 0.044 +type = "float" + diff --git a/toml/flame_perf_gw.toml b/toml/flame_perf_gw.toml new file mode 100644 index 00000000000..c8fdd94c22b --- /dev/null +++ b/toml/flame_perf_gw.toml @@ -0,0 +1,4 @@ +[zd_rayleigh] +alias = "zd_rayleigh" +value = 30000.0 +type = "float" diff --git a/toml/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.toml b/toml/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.toml new file mode 100644 index 00000000000..9a4640c8616 --- /dev/null +++ b/toml/longrun_aquaplanet_rhoe_equil_clearsky_highres_hightop_rayleigh35e3_float64.toml @@ -0,0 +1,10 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 10.0 +type = "float" + +[zd_rayleigh] +alias = "zd_rayleigh" +value = 35000.0 +type = "float" + diff --git a/toml/longrun_compressible_edmf_trmm.toml b/toml/longrun_compressible_edmf_trmm.toml new file mode 100644 index 00000000000..3d25ee688ee --- /dev/null +++ b/toml/longrun_compressible_edmf_trmm.toml @@ -0,0 +1,5 @@ +[zd_rayleigh] +alias = "zd_rayleigh" +value = 15000 +type = "float" + diff --git a/toml/longrun_hs_rhoe_dry_nz63_55km_rs35km.toml b/toml/longrun_hs_rhoe_dry_nz63_55km_rs35km.toml new file mode 100644 index 00000000000..466f90f978c --- /dev/null +++ b/toml/longrun_hs_rhoe_dry_nz63_55km_rs35km.toml @@ -0,0 +1,5 @@ +[zd_rayleigh] +alias = "zd_rayleigh" +value = 35000.0 +type = "float" + diff --git a/toml/longrun_hs_rhoe_equilmoist_highres_hightop_rayleigh30e3.toml b/toml/longrun_hs_rhoe_equilmoist_highres_hightop_rayleigh30e3.toml new file mode 100644 index 00000000000..c7741e67f93 --- /dev/null +++ b/toml/longrun_hs_rhoe_equilmoist_highres_hightop_rayleigh30e3.toml @@ -0,0 +1,10 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 10.0 +type = "float" + +[zd_rayleigh] +alias = "zd_rayleigh" +value = 30000.0 +type = "float" + diff --git a/toml/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.toml b/toml/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.toml new file mode 100644 index 00000000000..9a4640c8616 --- /dev/null +++ b/toml/longrun_hs_rhoe_equilmoist_nz63_0M_55km_rs35km.toml @@ -0,0 +1,10 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 10.0 +type = "float" + +[zd_rayleigh] +alias = "zd_rayleigh" +value = 35000.0 +type = "float" + diff --git a/toml/plane_agnesi_mountain_test_stretched.toml b/toml/plane_agnesi_mountain_test_stretched.toml new file mode 100644 index 00000000000..aae1913cb60 --- /dev/null +++ b/toml/plane_agnesi_mountain_test_stretched.toml @@ -0,0 +1,5 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 0.1 +type = "float" + diff --git a/toml/plane_agnesi_mountain_test_uniform.toml b/toml/plane_agnesi_mountain_test_uniform.toml new file mode 100644 index 00000000000..aae1913cb60 --- /dev/null +++ b/toml/plane_agnesi_mountain_test_uniform.toml @@ -0,0 +1,5 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 0.1 +type = "float" + diff --git a/toml/plane_schar_mountain_test_stretched.toml b/toml/plane_schar_mountain_test_stretched.toml new file mode 100644 index 00000000000..aae1913cb60 --- /dev/null +++ b/toml/plane_schar_mountain_test_stretched.toml @@ -0,0 +1,5 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 0.1 +type = "float" + diff --git a/toml/plane_schar_mountain_test_uniform.toml b/toml/plane_schar_mountain_test_uniform.toml new file mode 100644 index 00000000000..aae1913cb60 --- /dev/null +++ b/toml/plane_schar_mountain_test_uniform.toml @@ -0,0 +1,5 @@ +[alpha_rayleigh_w] +alias = "alpha_rayleigh_w" +value = 0.1 +type = "float" + diff --git a/toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.toml b/toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.toml new file mode 100644 index 00000000000..3a4f21f0886 --- /dev/null +++ b/toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_raw_zonallyasymmetric.toml @@ -0,0 +1,5 @@ +[zd_rayleigh] +alias = "zd_rayleigh" +value = 30000.0 +type = "float" + diff --git a/toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml b/toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml new file mode 100644 index 00000000000..3a4f21f0886 --- /dev/null +++ b/toml/sphere_aquaplanet_rhoe_equilmoist_allsky_gw_res.toml @@ -0,0 +1,5 @@ +[zd_rayleigh] +alias = "zd_rayleigh" +value = 30000.0 +type = "float" + diff --git a/toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml b/toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml new file mode 100644 index 00000000000..9196727ee2e --- /dev/null +++ b/toml/sphere_held_suarez_rhoe_equilmoist_hightop_sponge.toml @@ -0,0 +1,10 @@ +[zd_viscous] +alias = "zd_viscous" +value = 30000.0 +type = "float" + +[zd_rayleigh] +alias = "zd_rayleigh" +value = 30000.0 +type = "float" + diff --git a/toml/sphere_ssp_first_tracer_energy_upwind_held_suarez_rhoe_equilmoist_hightop_sponge.toml b/toml/sphere_ssp_first_tracer_energy_upwind_held_suarez_rhoe_equilmoist_hightop_sponge.toml new file mode 100644 index 00000000000..9196727ee2e --- /dev/null +++ b/toml/sphere_ssp_first_tracer_energy_upwind_held_suarez_rhoe_equilmoist_hightop_sponge.toml @@ -0,0 +1,10 @@ +[zd_viscous] +alias = "zd_viscous" +value = 30000.0 +type = "float" + +[zd_rayleigh] +alias = "zd_rayleigh" +value = 30000.0 +type = "float" + From d2c69681dfbe960d0a468f40dd85aea679f5cfa1 Mon Sep 17 00:00:00 2001 From: nefrathenrici Date: Thu, 31 Aug 2023 11:57:47 -0700 Subject: [PATCH 2/3] increase alloc limits (edmf, diagnostic edmfx) --- perf/flame.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/flame.jl b/perf/flame.jl index 76869960326..38bebad450a 100644 --- a/perf/flame.jl +++ b/perf/flame.jl @@ -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 From bfb2a02c6d156706e5fcae9c7ee8e2f8216ce90f Mon Sep 17 00:00:00 2001 From: nefrathenrici Date: Thu, 31 Aug 2023 11:58:01 -0700 Subject: [PATCH 3/3] increment ref counter --- regression_tests/ref_counter.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression_tests/ref_counter.jl b/regression_tests/ref_counter.jl index 9289ddcee34..9f54fe3133b 100644 --- a/regression_tests/ref_counter.jl +++ b/regression_tests/ref_counter.jl @@ -1 +1 @@ -121 +122