@@ -6,42 +6,48 @@ import ClimaComms
66import ClimaCore: InputOutput, Meshes, Spaces, Quadratures
77import ClimaParams
88
9- # @compile_workload begin
10- # with_logger(NullLogger()) do
11- # FT = Float32 # Float64?
12- # h_elem = 6 # 16, 30?
13- # z_elem = 10 # 30, 31, 63?
14- # x_elem = y_elem = 2
15- # x_max = y_max = 1e8
16- # z_max = FT(30000.0)
17- # dz_bottom = FT(500) # other values?
18- # z_stretch = Meshes.HyperbolicTangentStretching(dz_bottom) # Meshes.Uniform()
19- # bubble = true # false
20- # parsed_args =
21- # Dict{String, Any}("topography" => "NoWarp", "topo_smoothing" => false)
22- # comms_ctx = ClimaComms.context(ClimaComms.CPUSingleThreaded())
23- # deep = false
9+ @compile_workload begin
10+ with_logger (NullLogger ()) do
11+ FT = Float32 # Float64?
12+ h_elem = 6 # 16, 30?
13+ z_elem = 10 # 30, 31, 63?
14+ x_elem = y_elem = 2
15+ x_max = y_max = 1e8
16+ z_max = FT (30000.0 )
17+ dz_bottom = FT (500 ) # other values?
18+ z_stretch = true # Meshes.Uniform()
19+ bubble = true # false
20+ nh_poly = 3 # GLL{4} = nh_poly + 1
21+ context = ClimaComms. context (ClimaComms. CPUSingleThreaded ())
22+ deep_atmosphere = false
23+ topography = CA. NoTopography ()
24+ params = CA. ClimaAtmosParameters (FT)
25+ radius = CA. Parameters. planet_radius (params)
2426
25- # # constants
26- # quad = Quadratures.GLL{4}()
27- # params = CA.ClimaAtmosParameters(FT)
28- # radius = CA.Parameters.planet_radius(params)
27+ sphere_grid = CA. SphereGrid (
28+ FT;
29+ context, radius, h_elem, nh_poly, z_elem, z_max, z_stretch,
30+ dz_bottom, bubble, deep_atmosphere,
31+ topography,
32+ )
33+ box_grid = CA. BoxGrid (
34+ FT; context, x_elem, x_max, y_elem, y_max, z_elem, z_max, nh_poly,
35+ z_stretch, dz_bottom, bubble, deep_atmosphere,
36+ periodic_x = true , periodic_y = true , topography,
37+ )
38+ plane_grid = CA. PlaneGrid (
39+ FT; context, x_elem, x_max, z_elem, z_max, nh_poly, z_stretch,
40+ dz_bottom, bubble, deep_atmosphere, periodic_x = true ,
41+ topography,
42+ )
43+ column_grid = CA. ColGrid (
44+ FT; context, z_elem, z_max, z_stretch, dz_bottom,
45+ )
2946
30- # # Sphere
31- # horz_mesh = CA.cubed_sphere_mesh(; radius, h_elem)
32- # h_space = CA.make_horizontal_space(horz_mesh, quad, comms_ctx, bubble)
33- # CA.make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args)
47+ for grid in [sphere_grid, box_grid, plane_grid, column_grid]
48+ CA. get_spaces (grid, context)
49+ end
50+ end
51+ end
3452
35- # # box
36- # horizontal_mesh = CA.periodic_rectangle_mesh(; x_max, y_max, x_elem, y_elem)
37- # h_space = CA.make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
38- # # This is broken
39- # # CA.make_hybrid_spaces(h_space, z_max, z_elem, z_stretch; parsed_args)
40-
41- # # plane
42- # horizontal_mesh = CA.periodic_line_mesh(; x_max, x_elem)
43- # h_space = CA.make_horizontal_space(horizontal_mesh, quad, comms_ctx, bubble)
44- # end
45- # end
46-
47- end # module Precompile
53+ end # module PrecompileCI
0 commit comments