diff --git a/.buildkite/longruns_gpu/pipeline.yml b/.buildkite/longruns_gpu/pipeline.yml index c74884a925..cfce4daad6 100644 --- a/.buildkite/longruns_gpu/pipeline.yml +++ b/.buildkite/longruns_gpu/pipeline.yml @@ -173,6 +173,16 @@ steps: slurm_time: 12:00:00 env: JOB_NAME: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth" + + - label: ":computer: aquaplanet equilmoist clearsky radiation + 0M microphysics + earth topography (SLEVE)" + command: + - srun julia --project=examples examples/hybrid/driver.jl --config_file $CONFIG_PATH/$$JOB_NAME.yml + artifact_paths: "$$JOB_NAME/*" + agents: + slurm_gpus: 1 + slurm_time: 6:00:00 + env: + JOB_NAME: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve" - group: "DYAMOND" diff --git a/config/default_configs/default_config.yml b/config/default_configs/default_config.yml index b9fb3d40eb..b95ae3dc4d 100644 --- a/config/default_configs/default_config.yml +++ b/config/default_configs/default_config.yml @@ -40,6 +40,15 @@ scalar_hyperdiffusion_coefficient: topography: help: "Define the surface elevation profile [`NoWarp`,`Earth`,`DCMIP200`,`Agnesi`]" value: "NoWarp" +mesh_warp_type: + help: "Sets the interior mesh warp method [`Linear`, `SLEVE`]" + value: "Linear" +sleve_eta: + help: "If SLEVE coordinates are chosen, sets the `ηₕ` parameter (if z/z_top > ηₕ, no warping is applied)" + value: 0.7 +sleve_s: + help: "If SLEVE coordinates are chosen, sets `s`, the warping decay scale parameter" + value: 10.0 topo_smoothing: help: "Choose whether to order-2 smoothing on the LGL mesh" value: false diff --git a/config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.yml b/config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.yml new file mode 100644 index 0000000000..d2b25af6a8 --- /dev/null +++ b/config/longrun_configs/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.yml @@ -0,0 +1,26 @@ +dt_save_state_to_disk: "10days" +dt: "100secs" +rad: "clearsky" +dt_rad: "6hours" +t_end: "200days" +dz_bottom: 30.0 +dz_top: 3000.0 +h_elem: 16 +z_elem: 63 +z_max: 55000.0 +job_id: "longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve" +moist: "equil" +precip_model: "0M" +rayleigh_sponge: true +vorticity_hyperdiffusion_coefficient: 3.0 +divergence_damping_factor: 1.0 +scalar_hyperdiffusion_coefficient: 3.0 +smoothing_order: 2 +topo_smoothing: true +mesh_warp_type: "SLEVE" +topography: "Earth" +surface_setup: "DefaultMoninObukhov" +vert_diff: "FriersonDiffusion" +implicit_diffusion: true +approximate_linear_solve_iters: 2 +toml: [toml/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.toml] diff --git a/src/solver/type_getters.jl b/src/solver/type_getters.jl index 3f4dcce3a2..5b103d442c 100644 --- a/src/solver/type_getters.jl +++ b/src/solver/type_getters.jl @@ -189,8 +189,8 @@ function get_spaces(parsed_args, params, comms_ctx) z_max, z_elem, z_stretch; + parsed_args = parsed_args, surface_warp = warp_function, - topo_smoothing = parsed_args["topo_smoothing"], deep, ) end @@ -216,7 +216,7 @@ function get_spaces(parsed_args, params, comms_ctx) else Meshes.Uniform() end - make_hybrid_spaces(h_space, z_max, z_elem, z_stretch) + make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args) elseif parsed_args["config"] == "box" FT = eltype(params) nh_poly = parsed_args["nh_poly"] @@ -243,6 +243,7 @@ function get_spaces(parsed_args, params, comms_ctx) z_max, z_elem, z_stretch; + parsed_args, surface_warp = warp_function, deep, ) @@ -266,6 +267,7 @@ function get_spaces(parsed_args, params, comms_ctx) z_max, z_elem, z_stretch; + parsed_args, surface_warp = warp_function, deep, ) diff --git a/src/utils/common_spaces.jl b/src/utils/common_spaces.jl index b26d89babe..7279285b89 100644 --- a/src/utils/common_spaces.jl +++ b/src/utils/common_spaces.jl @@ -82,7 +82,9 @@ function make_hybrid_spaces( surface_warp = nothing, topo_smoothing = false, deep = false, + parsed_args = nothing, ) + FT = eltype(z_max) # TODO: change this to make_hybrid_grid h_grid = Spaces.grid(h_space) z_domain = Domains.IntervalDomain( @@ -101,11 +103,23 @@ function make_hybrid_spaces( if isnothing(surface_warp) hypsography = Hypsography.Flat() else + topo_smoothing = parsed_args["topo_smoothing"] z_surface = surface_warp(Fields.coordinate_field(h_space)) if topo_smoothing Hypsography.diffuse_surface_elevation!(z_surface) end - hypsography = Hypsography.LinearAdaption(Geometry.ZPoint.(z_surface)) + if parsed_args["mesh_warp_type"] == "SLEVE" + @info "SLEVE mesh warp" + hypsography = Hypsography.SLEVEAdaption( + z_surface, + parsed_args["sleve_eta"], + parsed_args["sleve_s"], + ) + elseif parsed_args["mesh_warp_type"] == "Linear" + @info "Linear mesh warp" + hypsography = + Hypsography.LinearAdaption(Geometry.ZPoint.(z_surface)) + end end grid = Grids.ExtrudedFiniteDifferenceGrid(h_grid, z_grid, hypsography; deep) # TODO: return the grid diff --git a/test/gravity_wave/orographic_gravity_wave/ogwd_3d.jl b/test/gravity_wave/orographic_gravity_wave/ogwd_3d.jl index f2abd2e11e..69185cd750 100644 --- a/test/gravity_wave/orographic_gravity_wave/ogwd_3d.jl +++ b/test/gravity_wave/orographic_gravity_wave/ogwd_3d.jl @@ -15,6 +15,9 @@ include("../../../post_processing/remap/remap_helpers.jl") include("../gw_plotutils.jl") comms_ctx = ClimaComms.SingletonCommsContext() +test_args = ClimaAtmos.cli_defaults(CA.argparse_settings()) +config_dict = Dict("topo_smoothing" => false, "mesh_warp_type" => "Linear") +parsed_args = CA.AtmosConfig(config_dict).parsed_args # load gfdl data include(joinpath(pkgdir(ClimaAtmos), "artifacts", "artifact_funcs.jl")) @@ -100,12 +103,14 @@ quad = Quadratures.GLL{nh_poly + 1}() horizontal_mesh = CA.cubed_sphere_mesh(; radius, h_elem) h_space = CA.make_horizontal_space(horizontal_mesh, quad, comms_ctx, false) + z_stretch = Meshes.GeneralizedExponentialStretching(dz_bottom, dz_top) center_space, face_space = CA.make_hybrid_spaces( h_space, z_max, z_elem, z_stretch; + parsed_args, surface_warp = warp_function, ) diff --git a/toml/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.toml b/toml/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.toml new file mode 100644 index 0000000000..cdfb848a88 --- /dev/null +++ b/toml/longrun_aquaplanet_rhoe_equil_55km_nz63_clearsky_0M_earth_sleve.toml @@ -0,0 +1,10 @@ +[alpha_rayleigh_w] +value = 10.0 +type = "float" + +[zd_rayleigh] +value = 35000.0 + +[alpha_rayleigh_uh] +alias = "alpha_rayleigh_uh" +value = 0.0