@@ -11,6 +11,7 @@ function get_diagnostics(
11
11
(; dt, start_date) = sim_info
12
12
13
13
FT = Spaces. undertype (axes (Y. c))
14
+ context = ClimaComms. context (axes (Y. c))
14
15
15
16
# We either get the diagnostics section in the YAML file, or we return an empty list
16
17
# (which will result in an empty list being created by the map below)
@@ -40,9 +41,26 @@ function get_diagnostics(
40
41
num_netcdf_points =
41
42
tuple (parsed_args[" netcdf_interpolation_num_points" ]. .. )
42
43
else
43
- # TODO : Once https://github.com/CliMA/ClimaCore.jl/pull/1567 is merged,
44
- # dispatch over the Grid type
45
- num_netcdf_points = (180 , 90 , 50 )
44
+ # Estimate the number of points we need to cover the entire domain
45
+ # ncolumns is the number of local columns
46
+ tot_num_columns =
47
+ ClimaComms. nprocs (context) * Fields. ncolumns (axes (Y. c))
48
+ if parsed_args[" config" ] == " plane"
49
+ num1, num2 = tot_num_columns, 0
50
+ elseif parsed_args[" config" ] == " sphere"
51
+ num2 = round (Int, sqrt (tot_num_columns / 2 ))
52
+ num1 = 2 num2
53
+ elseif parsed_args[" config" ] == " box"
54
+ num2 = round (Int, sqrt (tot_num_columns))
55
+ num1 = num2
56
+ elseif parsed_args[" config" ] == " column"
57
+ # We need at least two points horizontally because our column is
58
+ # actually a box
59
+ num1, num2 = 2 , 2
60
+ else
61
+ error (" Uncaught case" )
62
+ end
63
+ num_netcdf_points = (num1, num2, Spaces. nlevels (axes (Y. c)))
46
64
end
47
65
48
66
z_sampling_method =
0 commit comments