@@ -3,7 +3,6 @@ module PrecompileCI
33using PrecompileTools, Logging
44import ClimaAtmos as CA
55import ClimaComms
6- import ClimaCore: InputOutput, Meshes, Spaces, Quadratures
76import ClimaParams
87
98@compile_workload begin
@@ -14,34 +13,43 @@ import ClimaParams
1413 x_elem = y_elem = 2
1514 x_max = y_max = 1e8
1615 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
24-
25- # constants
26- quad = Quadratures. GLL {4} ()
16+ dz_bottom = FT (500 )
17+ z_stretch = true
18+ bubble = true
19+ nh_poly = 3 # GLL{4} = nh_poly + 1
20+ # TODO : compile CUDA methods as well
21+ context = ClimaComms. context (ClimaComms. CPUSingleThreaded ())
22+ topography = CA. NoTopography ()
2723 params = CA. ClimaAtmosParameters (FT)
2824 radius = CA. Parameters. planet_radius (params)
2925
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)
34-
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)
26+ sphere_grid = CA. SphereGrid (
27+ FT;
28+ context,
29+ radius, h_elem, nh_poly,
30+ z_elem, z_max, z_stretch, dz_bottom,
31+ bubble, topography,
32+ )
33+ box_grid = CA. BoxGrid (
34+ FT;
35+ context,
36+ x_elem, x_max, y_elem, y_max, nh_poly, periodic_x = true , periodic_y = true ,
37+ z_elem, z_max, z_stretch, dz_bottom,
38+ bubble, topography,
39+ )
40+ plane_grid = CA. PlaneGrid (
41+ FT;
42+ context,
43+ x_elem, x_max, nh_poly, periodic_x = true ,
44+ z_elem, z_max, z_stretch, dz_bottom,
45+ bubble, topography,
46+ )
47+ column_grid = CA. ColumnGrid (
48+ FT; context, z_elem, z_max, z_stretch, dz_bottom,
49+ )
50+ all_grids = (sphere_grid, box_grid, plane_grid, column_grid)
51+ foreach (CA. get_spaces, all_grids)
4452 end
4553end
4654
47- end # module Precompile
55+ end # module PrecompileCI
0 commit comments